m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/password-store.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 5075bb8..9923907 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -312,6 +312,7 @@ case "$command" in
[[ $force -eq 0 && -e $passfile ]] && yesno "An entry already exists for $path. Overwrite it?"
pass="$(pwgen -s $symbols $length 1)"
+ [[ -n $pass ]] || exit 1
$GPG -e -r "$ID" -o "$passfile" $GPG_OPTS <<<"$pass"
git_add_file "$passfile" "Added generated password for $path to store."