diff --git a/cmd/which.go b/cmd/which.go index 25c2cdb..168abdd 100644 --- a/cmd/which.go +++ b/cmd/which.go @@ -44,8 +44,6 @@ func Which(cmd string, options BasicOptions) (dir string, err error) { } } - fmt.Println(string(outputBytes)) - return strings.Trim(string(outputBytes), "\n"), nil } diff --git a/linux/run.go b/linux/run.go index cd564d5..960fd37 100644 --- a/linux/run.go +++ b/linux/run.go @@ -106,8 +106,6 @@ func (cmd *LinuxCommand) Run() error { } } - fmt.Println(command.String()) - if err := command.Start(); err != nil { var exitErr *exec.ExitError if errors.As(err, &exitErr) { diff --git a/linux/utils.go b/linux/utils.go index d033379..5d21199 100644 --- a/linux/utils.go +++ b/linux/utils.go @@ -12,8 +12,6 @@ import ( func (cmd *LinuxCommand) isCommandExecutable(command string) (bool, error) { - fmt.Println(command) - whichOut, err := cmd2.Which(command, cmd2.BasicOptions{ Env: cmd.Options.Env, Sources: cmd.Options.Sources, @@ -29,14 +27,10 @@ func (cmd *LinuxCommand) isCommandExecutable(command string) (bool, error) { } } - fmt.Println(whichOut) - if len(whichOut) == 0 { return false, nil } - - fmt.Println("which:", whichOut) - + if err := unix.Access(whichOut, unix.X_OK); err != nil { if err == unix.EACCES { return false, nil