mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-10 08:20:59 +00:00
fix loader loader when run from gopath
This commit is contained in:
@@ -75,7 +75,11 @@ func newGithubLoader(repoUrl string, fs fs.FileSystem) (*githubLoader, error) {
|
||||
|
||||
// isRepoUrl checks if a string is a repo Url
|
||||
func isRepoUrl(s string) bool {
|
||||
return strings.Contains(s, ".com") || strings.Contains(s, ".org") || strings.Contains(s, "https://")
|
||||
if strings.HasPrefix(s, "https://") {
|
||||
return true
|
||||
}
|
||||
host := strings.SplitN(s, "/", 2)[0]
|
||||
return strings.Contains(host, ".com") || strings.Contains(host, ".org")
|
||||
}
|
||||
|
||||
// Checkout clones a github repo with specified commit/tag/branch
|
||||
|
||||
Reference in New Issue
Block a user