Skip to content

Commit 184db0b

Browse files
committed
fix origin path for windows
1 parent 8e60aa5 commit 184db0b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

api/resource/origin.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package resource
55

66
import (
7-
"path/filepath"
7+
"path"
88
"strings"
99

1010
"sigs.k8s.io/kustomize/api/internal/git"
@@ -48,17 +48,17 @@ func (origin *Origin) Copy() Origin {
4848
}
4949

5050
// Append returns a copy of origin with a path appended to it
51-
func (origin *Origin) Append(path string) *Origin {
51+
func (origin *Origin) Append(inputPath string) *Origin {
5252
originCopy := origin.Copy()
53-
repoSpec, err := git.NewRepoSpecFromURL(path)
53+
repoSpec, err := git.NewRepoSpecFromURL(inputPath)
5454
if err == nil {
5555
originCopy.Repo = repoSpec.CloneSpec()
5656
absPath := repoSpec.AbsPath()
57-
path = absPath[strings.Index(absPath[1:], "/")+1:][1:]
57+
inputPath = absPath[strings.Index(absPath[1:], "/")+1:][1:]
5858
originCopy.Path = ""
5959
originCopy.Ref = repoSpec.Ref
6060
}
61-
originCopy.Path = filepath.Join(originCopy.Path, path)
61+
originCopy.Path = path.Join(originCopy.Path, inputPath)
6262
return &originCopy
6363
}
6464

0 commit comments

Comments
 (0)