Skip to content

Commit 7174f40

Browse files
committed
fix: undefined vars on windows
1 parent a8435b6 commit 7174f40

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

util/util_windows.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ package util
55
import (
66
"path/filepath"
77
"os"
8+
9+
"hilbish/util"
810
)
911

1012
func FindExecutable(path string, inPath, dirs bool) error {
@@ -21,15 +23,15 @@ func FindExecutable(path string, inPath, dirs bool) error {
2123
} else {
2224
_, err := os.Stat(path)
2325
if err == nil {
24-
if contains(pathExts, nameExt) { return nil }
25-
return errNotExec
26+
if util.Contains(pathExts, nameExt) { return nil }
27+
return util.ErrNotExec
2628
}
2729
}
2830
} else {
2931
_, err := os.Stat(path)
3032
if err == nil {
31-
if contains(pathExts, nameExt) { return nil }
32-
return errNotExec
33+
if util.Contains(pathExts, nameExt) { return nil }
34+
return util.ErrNotExec
3335
}
3436
}
3537

0 commit comments

Comments
 (0)