From bb9ace058fa78fbdad9b31237f1be486c8e995cb Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Fri, 4 Oct 2019 14:43:21 -0700 Subject: [PATCH] address Don's comment --- cmd/executor/cmd/root.go | 4 ++-- cmd/executor/cmd/root_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/executor/cmd/root.go b/cmd/executor/cmd/root.go index 53c3eeadc..566accfa1 100644 --- a/cmd/executor/cmd/root.go +++ b/cmd/executor/cmd/root.go @@ -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) } diff --git a/cmd/executor/cmd/root_test.go b/cmd/executor/cmd/root_test.go index e760c1f06..cec6dff69 100644 --- a/cmd/executor/cmd/root_test.go +++ b/cmd/executor/cmd/root_test.go @@ -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)) }) } }