summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-02-15 23:53:45 +0100
committerRuben Pollan <meskio@sindominio.net>2018-02-15 23:53:45 +0100
commitfd5b9b59804b51fb462b2678add95729bd78a812 (patch)
tree77386b629d725548ce38efb1a718a52bfb193ce1
parent037ab29231cfbfe1b45f22309b7c08ad77deca50 (diff)
[bug] check if error is not nil before checking if it's nopolkit
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index 9938359..e1b2a56 100644
--- a/main.go
+++ b/main.go
@@ -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 {