Skip to content
Snippets Groups Projects
Commit 24c535e4 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld
Browse files

show: error out if password store is empty.

parent 562812fb
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment