summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsrc/password-store.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 402563c..c8a0a9f 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -184,9 +184,16 @@ case "$command" in
exit 1
fi
path="$1"
+ passfile="$PREFIX/$path.gpg"
+
+ if [[ -e $passfile ]]; then
+ prompt="An entry already exists for $path. Overwrite it [y/N]? "
+ read -p "$prompt" yesno
+ [[ $yesno == "y" || $yesno == "Y" ]] || exit 1
+ fi
+
mkdir -p -v "$PREFIX/$(dirname "$path")"
- passfile="$PREFIX/$path.gpg"
if [[ $ml -eq 1 ]]; then
echo "Enter contents of $path and press Ctrl+D when finished:"
echo
5: Change cache ownership.René 'Necoro' Neumann1-0/+4 2023-05-11Issue #95: Add hint about sensible access rights.René 'Necoro' Neumann1-0/+1 2023-04-23[workflow] Port changes also to releaseRené 'Necoro' Neumann1-6/+5 2023-04-23[workflow] Checkout before go setupRené 'Necoro' Neumann1-3/+3 2023-04-23[workflow] determine go version from go.modRené 'Necoro' Neumann1-3/+2 2023-04-23Improve test to also validate error messageRené 'Necoro' Neumann1-42/+39 2023-04-22Fix/improve testsRené 'Necoro' Neumann1-59/+104 2023-04-22Improve error handlingRené 'Necoro' Neumann1-1/+11 2023-04-21Fix workflow: '1.20' needs to be quotedRené 'Necoro' Neumann2-2/+2