summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2024-07-15 14:24:22 -0400
committerGitHub <noreply@github.com>2024-07-15 14:24:22 -0400
commitc891164574ae2d097d041d68bdde6fae18630564 (patch)
treeffffe5b93e0be30849e38aee60a8e66553676882
parent10a16e0ee6442425e7ca1634b1d3356e6d4d04f6 (diff)
parent11e54213dd16fb3b39be934ce0d465483ddfed80 (diff)
Merge pull request #985 from speedie1337/master
Don't prompt for password, if the email address already has one stored.
-rwxr-xr-xbin/mw6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/mw b/bin/mw
index cdb7856..44086be 100755
--- a/bin/mw
+++ b/bin/mw
@@ -173,11 +173,11 @@ askinfo() {
[ -z "$passprefix" ] && passprefix=""
hostname="${fulladdr#*@}"
login="${login:-$fulladdr}"
- if [ -n "${password+x}" ]; then
+ if [ -n "${password+x}" ] && [ ! -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr.gpg" ]; then
insertpass
- else
+ elif [ ! -f "$PASSWORD_STORE_DIR/$passprefix$fulladdr.gpg" ]; then
getpass
- fi
+ fi
}
insertpass() {