Skip to content

Commit

Permalink
Fix path assumption
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde Beydals <hello@hidde.co>
  • Loading branch information
hiddeco committed May 3, 2022
1 parent ca77155 commit 6f9850f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/manifestgen/install/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ func build(base, output string) error {
return err
}

parent := path.Dir(base)
fs, err := filesys.MakeFsOnDiskSecureBuild(parent)
outputBase := filepath.Dir(strings.TrimSuffix(output, string(filepath.Separator)))
fs, err := filesys.MakeFsOnDiskSecure(outputBase)
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/manifestgen/kustomization/kustomization.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ package kustomization
import (
"fmt"
"os"
"path"
"path/filepath"
"strings"
"sync"

"sigs.k8s.io/kustomize/api/konfig"
Expand Down Expand Up @@ -143,7 +143,7 @@ func Build(base string) ([]byte, error) {
kustomizeBuildMutex.Lock()
defer kustomizeBuildMutex.Unlock()

parent := path.Dir(base)
parent := filepath.Dir(strings.TrimSuffix(base, string(filepath.Separator)))
fs, err := filesys.MakeFsOnDiskSecureBuild(parent)
if err != nil {
return nil, err
Expand Down

0 comments on commit 6f9850f

Please sign in to comment.