readpassword: check extpass return code
...and exit if it is not zero.
This commit is contained in:
parent
540f125f18
commit
b2d33028a6
|
@ -98,7 +98,11 @@ func readPasswordExtpass(extpass string) string {
|
||||||
}
|
}
|
||||||
p := readLineUnbuffered(pipe)
|
p := readLineUnbuffered(pipe)
|
||||||
pipe.Close()
|
pipe.Close()
|
||||||
cmd.Wait()
|
err = cmd.Wait()
|
||||||
|
if err != nil {
|
||||||
|
tlog.Fatal.Printf("extpass program returned an error: %v", err)
|
||||||
|
os.Exit(exitCode)
|
||||||
|
}
|
||||||
if len(p) == 0 {
|
if len(p) == 0 {
|
||||||
tlog.Fatal.Println("extpass: password is empty")
|
tlog.Fatal.Println("extpass: password is empty")
|
||||||
os.Exit(exitCode)
|
os.Exit(exitCode)
|
||||||
|
|
Loading…
Reference in New Issue