From 7b294ed18b364aef8d9076b85923b27331e71d8b Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Thu, 30 Jul 2020 19:39:49 +0200 Subject: [PATCH] gpg: check for exit code to make sure process was killed, fix #15 --- detector/gpg.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/detector/gpg.go b/detector/gpg.go index 3aeeb85..992e84b 100644 --- a/detector/gpg.go +++ b/detector/gpg.go @@ -83,8 +83,8 @@ func isGPGCardBusy() bool { cmd.Process.Kill() }) - err := cmd.Wait() + cmd.Wait() timer.Stop() - return err != nil + return cmd.ProcessState.ExitCode() == -1 }