summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-04-24 19:11:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2014-04-24 19:12:10 +0200
commit24c535e41b71cf6fdc22216b3c4196264e247880 (patch)
tree8e713c1af1ce5a25a20410a99745979637d7b249 /src
parent562812fb642fcc03a0781fa49170dbb607a90f5b (diff)
downloadpass-24c535e41b71cf6fdc22216b3c4196264e247880.tar.gz
pass-24c535e41b71cf6fdc22216b3c4196264e247880.tar.bz2
pass-24c535e41b71cf6fdc22216b3c4196264e247880.zip
show: error out if password store is empty.
Diffstat (limited to '')
-rwxr-xr-xsrc/password-store.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index c3824f9..5e9fb03 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -332,8 +332,11 @@ cmd_show() {
echo "${path%\/}"
fi
tree -C -l --noreport "$PREFIX/$path" | tail -n +2 | sed 's/\.gpg$//'
+ elif [[ -z $path ]]; then
+ echo "Error: password store is empty. Try \"pass init\"."
+ exit 1
else
- echo "$path is not in the password store."
+ echo "Error: $path is not in the password store."
exit 1
fi
}