mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Cover CleanedAbs
This commit is contained in:
@@ -102,9 +102,16 @@ func (fs *fakeFs) Open(name string) (File, error) {
|
||||
return fs.m[name], nil
|
||||
}
|
||||
|
||||
// EvalSymlinks does nothing and cannot fail.
|
||||
func (fs *fakeFs) EvalSymlinks(path string) (string, error) {
|
||||
return path, nil
|
||||
// CleanedAbs does nothing and cannot fail.
|
||||
func (fs *fakeFs) CleanedAbs(path string) (string, string, error) {
|
||||
if fs.IsDir(path) {
|
||||
return path, "", nil
|
||||
}
|
||||
d := filepath.Dir(path)
|
||||
if d == path {
|
||||
return d, "", nil
|
||||
}
|
||||
return d, filepath.Base(path), nil
|
||||
}
|
||||
|
||||
// Exists returns true if file is known.
|
||||
|
||||
Reference in New Issue
Block a user