Skip to content

Commit

Permalink
Strip binary off args
Browse files Browse the repository at this point in the history
  • Loading branch information
winks committed Aug 9, 2017
1 parent 4efb6a7 commit 7b10877
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ip_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,15 @@ func run(ip string, tail []string) int {
fmt.Printf("Checking IP: %s\n", ip)
}
binary, lookErr := exec.LookPath(tail[0])
tail = tail[1:]
if lookErr != nil {
fmt.Println(lookErr)
// check not found
return 3
} else {
if verbose {
fmt.Printf("Found binary: %s\n", binary)
}
}

// replace '%%IP%%' placeholder in the command to be executed
Expand Down

0 comments on commit 7b10877

Please sign in to comment.