diff options
author | Ruben Pollan <meskio@sindominio.net> | 2018-02-15 23:53:45 +0100 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2018-02-15 23:53:45 +0100 |
commit | fd5b9b59804b51fb462b2678add95729bd78a812 (patch) | |
tree | 77386b629d725548ce38efb1a718a52bfb193ce1 | |
parent | 037ab29231cfbfe1b45f22309b7c08ad77deca50 (diff) |
[bug] check if error is not nil before checking if it's nopolkit
-rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -45,7 +45,7 @@ func main() { func checkAndInstallHelpers(b *bitmask.Bitmask, notify *notificator) { helpers, priviledge, err := b.VPNCheck() - if err.Error() == "nopolkit" || (err == nil && !priviledge) { + if (err != nil && err.Error() == "nopolkit") || (err == nil && !priviledge) { log.Printf("No polkit found") notify.authAgent() } else if err != nil { |