fixing cmd call

This commit is contained in:
afeiszli 2021-09-17 14:27:42 -04:00
parent 5c3bcbc32a
commit 6957006e75

View file

@ -93,12 +93,10 @@ func RemoveNetwork(network string) (bool, error) {
log.Println("could not find " + netclientPath + "netclient")
return false, err
}
cmdoutput, err := local.RunCmd(netclientPath + "netclient leave -n " + network)
if err != nil {
log.Println(string(cmdoutput))
return false, err
_, err = local.RunCmd(netclientPath+"netclient leave -n "+network, true)
if err == nil {
log.Println("Server removed from network " + network)
}
log.Println("Server removed from network " + network)
return true, err
}