summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2021-08-27 19:06:07 -0400
committerLuke Smith <luke@lukesmith.xyz>2021-08-27 19:06:07 -0400
commit9af08b71980d0566dcb0153ac8d6a386b532065c (patch)
tree9c2b978a39a3640c3e92ff21e5af50bc6c9a674a /bin
parentbd8551163ead2720fd3d3579f64f8816521be11c (diff)
parent0b9a9a3d7f2ad8394a1dd34464d14d2b4e225d68 (diff)
Merge branch 'master' of github.com:LukeSmithxyz/mutt-wizard
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mw5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/mw b/bin/mw
index fbf2884..823730e 100755
--- a/bin/mw
+++ b/bin/mw
@@ -29,8 +29,7 @@ done || { echo "CA Certificate not found. Please install one or link it to /etc/
checkbasics() { command -V gpg >/dev/null 2>&1 && GPG="gpg" || GPG="gpg2"
PASSWORD_STORE_DIR="${PASSWORD_STORE_DIR:-$HOME/.password-store}"
- [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] &&
- "$GPG" --list-secret-keys "$(cat "$PASSWORD_STORE_DIR/.gpg-id")" >/dev/null 2>&1 || {
+ [ -r "$PASSWORD_STORE_DIR/.gpg-id" ] || {
echo "First run \`pass init <yourgpgemail>\` to set up a password archive."
echo "(If you don't already have a GPG key pair, first run \`$GPG --full-generate-key\`.)"
exit 1 ;} ;}
@@ -214,7 +213,7 @@ askinfo() { \
}
createpass() { echo "$password" > "$PASSWORD_STORE_DIR/$fulladdr"
- "$GPG" -qer "$(cat "$PASSWORD_STORE_DIR/.gpg-id")" "$PASSWORD_STORE_DIR/$fulladdr"
+ "$GPG" -qe $(printf -- " -r %s" $(cat "$PASSWORD_STORE_DIR/.gpg-id")) "$PASSWORD_STORE_DIR/$fulladdr"
rm -f "$PASSWORD_STORE_DIR/$fulladdr" ;}
getpass() { while : ; do pass rm -f "$fulladdr" >/dev/null 2>&1