mirror of
https://github.com/bettercap/bettercap
synced 2025-07-30 19:50:06 -07:00
fix: fixes 'iw executable not found in path' error on macOS (fixes #454)
This commit is contained in:
parent
871dfe3024
commit
c234f3d36b
2 changed files with 19 additions and 8 deletions
|
@ -27,6 +27,13 @@ func UniqueInts(a []int, sorted bool) []int {
|
|||
return uniq
|
||||
}
|
||||
|
||||
func HasBinary(executable string) bool {
|
||||
if path, err := exec.LookPath(executable); err != nil || path == "" {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func ExecSilent(executable string, args []string) (string, error) {
|
||||
path, err := exec.LookPath(executable)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue