mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-09-18 13:22:17 +00:00
Implement locRootPath (#4909)
* Implement locRootPath, and include userinfo, port in locFilePath * Strip userinfo, port * Improve readability
This commit is contained in:
@@ -296,7 +296,10 @@ func (lc *localizer) localizeDir(path string) (string, error) {
|
||||
if repo := ldr.Repo(); repo != "" {
|
||||
// TODO(annasong): You need to check if you can add a localize directory here to store
|
||||
// the remote file content. There may be a directory that shares the localize directory name.
|
||||
locPath = locRootPath(path, repo, root)
|
||||
locPath, err = locRootPath(path, repo, root, lc.fSys)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
} else {
|
||||
locPath, err = filepath.Rel(lc.root.String(), root.String())
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user