mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Merge pull request #626 from monopole/fix616
Fix incorrect use of filepath.Separator
This commit is contained in:
@@ -119,11 +119,11 @@ func parseGithubUrl(n string) (
|
|||||||
if strings.HasSuffix(n, ".git") {
|
if strings.HasSuffix(n, ".git") {
|
||||||
n = n[0 : len(n)-len(".git")]
|
n = n[0 : len(n)-len(".git")]
|
||||||
}
|
}
|
||||||
i := strings.Index(n, string(filepath.Separator))
|
i := strings.Index(n, "/")
|
||||||
if i < 1 {
|
if i < 1 {
|
||||||
return "", "", "", "", errors.New("no separator")
|
return "", "", "", "", errors.New("no separator")
|
||||||
}
|
}
|
||||||
j := strings.Index(n[i+1:], string(filepath.Separator))
|
j := strings.Index(n[i+1:], "/")
|
||||||
if j >= 0 {
|
if j >= 0 {
|
||||||
j += i + 1
|
j += i + 1
|
||||||
repo = n[:j]
|
repo = n[:j]
|
||||||
|
|||||||
Reference in New Issue
Block a user