mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 09:51:23 +00:00
Replace all repo uri strings with git.RepoSpec.
This commit is contained in:
@@ -24,11 +24,16 @@ import (
|
||||
)
|
||||
|
||||
// NewLoader returns a Loader.
|
||||
func NewLoader(root string, fSys fs.FileSystem) (ifc.Loader, error) {
|
||||
if git.IsRepoUrl(root) {
|
||||
func NewLoader(path string, fSys fs.FileSystem) (ifc.Loader, error) {
|
||||
repoSpec, err := git.NewRepoSpecFromUrl(path)
|
||||
if err == nil {
|
||||
return newLoaderAtGitClone(
|
||||
root, fSys, nil, git.ClonerUsingGitExec)
|
||||
repoSpec, fSys, nil, git.ClonerUsingGitExec)
|
||||
}
|
||||
root, err := demandDirectoryRoot(fSys, path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return newLoaderAtConfirmedDir(
|
||||
root, fSys, nil, git.ClonerUsingGitExec)
|
||||
root, fSys, nil, git.ClonerUsingGitExec), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user