Skip to content

Commit

Permalink
Fix linux.CommandExist (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
kke authored Feb 9, 2021
1 parent d523a17 commit c0711ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (c Linux) CleanupEnvironment(h Host, env map[string]string) error {

// CommandExist returns true if the command exists
func (c Linux) CommandExist(h Host, cmd string) bool {
return h.Execf("sudo command -v %s", cmd) == nil
return h.Execf(`sudo -i command -v "%s"`, cmd) == nil
}

// Reboot executes the reboot command
Expand Down

0 comments on commit c0711ec

Please sign in to comment.