mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-09-30 22:11:32 +02:00
address Don's comment
This commit is contained in:
@@ -241,7 +241,7 @@ func resolveRelativePaths() error {
|
||||
}
|
||||
|
||||
for _, p := range optsPaths {
|
||||
if path := *p; skipPath(path) {
|
||||
if path := *p; shdSkip(path) {
|
||||
logrus.Debugf("Skip resolving path %s", path)
|
||||
continue
|
||||
}
|
||||
@@ -269,6 +269,6 @@ func isURL(path string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func skipPath(path string) bool {
|
||||
func shdSkip(path string) bool {
|
||||
return path == "" || isURL(path) || filepath.IsAbs(path)
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ func TestSkipPath(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.description, func(t *testing.T) {
|
||||
testutil.CheckDeepEqual(t, tt.expected, skipPath(tt.path))
|
||||
testutil.CheckDeepEqual(t, tt.expected, shdSkip(tt.path))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user