Skip to content

Commit 902bf04

Browse files
committed
chore: improve codebase based on feedback
1 parent 967cbfb commit 902bf04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ func GlobCanonicalPath(basePath string, globPaths ...string) ([]string, error) {
122122
matches, err := zglob.Glob(globPath)
123123
if err == nil {
124124
paths = append(paths, matches...)
125-
} else if err.Error() == "file does not exist" && strings.Contains(globPath, stackDir) {
125+
} else if errors.Is(err, os.ErrNotExist) && strings.Contains(CleanPath(globPath), stackDir) {
126126
// when using the stack feature, the directory may not exist yet,
127127
// as stack generation occurs after parsing the argument flags.
128128
paths = append(paths, globPath)

0 commit comments

Comments
 (0)