commit 6f209a5b75393ecc240338ba08585cd34a122b88 parent 13e86a6b56d5cfc8bef7e8c2fa4d65ff114ea57b Author: Antoine Amarilli <a3nm@a3nm.net> Date: Sat, 31 Oct 2015 12:03:52 +0100 really abort on failure Diffstat:
xpass | | | 10 | ++++++---- |
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/xpass b/xpass @@ -35,10 +35,12 @@ then # file does not exist, create password # also save anything specified on the commandline to the file echo "generate" - echo -e "will be replaced by password\n$USER" | pass add -m "$FILE" || \ - (zenity --error --text 'problem with pass add; aborting'; exit 2) - PINENTRY_USER_DATA="gtk" pass generate -i -n "$FILE" 12 || \ - (zenity --error --text 'problem with pass generate; aborting'; exit 2) + echo -e "will be replaced by password\n$USER" | pass add -m "$FILE" || { + zenity --error --text 'problem with pass add; aborting'; + exit 2; } + PINENTRY_USER_DATA="gtk" pass generate -i -n "$FILE" 12 || { + zenity --error --text 'problem with pass generate; aborting'; + exit 2; } zenity --info --text "generated password for $FILE $USER, will now type it" fi