diff --git a/gxutil/pm.go b/gxutil/pm.go index a8de892..5ed22a9 100644 --- a/gxutil/pm.go +++ b/gxutil/pm.go @@ -677,7 +677,11 @@ func getSubtoolPath(env string) (string, error) { binname := "gx-" + env + binarySuffix _, err := exec.LookPath(binname) if err != nil { - if !strings.Contains(err.Error(), "file not found") { + if eErr, ok := err.(*exec.Error); ok { + if eErr.Err != exec.ErrNotFound { + return "", err + } + } else { return "", err }