From c4bbc129b69968421964189b47f92b1e9f94da53 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Mon, 29 Mar 2021 17:25:15 +0200 Subject: [PATCH] fix: returning error when neither iw or iwconfig are found --- network/net_linux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/network/net_linux.go b/network/net_linux.go index b56788b0..7d817549 100644 --- a/network/net_linux.go +++ b/network/net_linux.go @@ -57,6 +57,8 @@ func SetInterfaceChannel(iface string, channel int) error { } else if out != "" { return fmt.Errorf("Unexpected output while setting interface %s to channel %d: %s", iface, channel, out) } + } else { + return fmt.Errorf("no iw or iwconfig binaries found in $PATH") } SetInterfaceCurrentChannel(iface, channel)