From 7174f40b5f2cdce398d7979bfabdecac60d29cd5 Mon Sep 17 00:00:00 2001 From: sammyette Date: Sun, 29 Dec 2024 01:48:11 -0400 Subject: [PATCH] fix: undefined vars on windows --- util/util_windows.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/util/util_windows.go b/util/util_windows.go index 4eb50c8..ab490ad 100644 --- a/util/util_windows.go +++ b/util/util_windows.go @@ -5,6 +5,8 @@ package util import ( "path/filepath" "os" + + "hilbish/util" ) func FindExecutable(path string, inPath, dirs bool) error { @@ -21,15 +23,15 @@ func FindExecutable(path string, inPath, dirs bool) error { } else { _, err := os.Stat(path) if err == nil { - if contains(pathExts, nameExt) { return nil } - return errNotExec + if util.Contains(pathExts, nameExt) { return nil } + return util.ErrNotExec } } } else { _, err := os.Stat(path) if err == nil { - if contains(pathExts, nameExt) { return nil } - return errNotExec + if util.Contains(pathExts, nameExt) { return nil } + return util.ErrNotExec } }