diff --git a/linux/utils.go b/linux/utils.go index ca76814..21d38fb 100644 --- a/linux/utils.go +++ b/linux/utils.go @@ -27,13 +27,11 @@ func (cmd *LinuxCommand) isCommandExecutable(command string) (bool, error) { } } - if len(whichOut) > 0 { - command = whichOut + if len(whichOut) == 0 { + return false, nil } - fmt.Println("cmd: ", command) - - if err := unix.Access(command, unix.X_OK); err != nil { + if err := unix.Access(whichOut, unix.X_OK); err != nil { if err == unix.EACCES { return false, nil } else {