The following (inserting "b") should fail: > $ echo "a" | pass insert -e foo > $ echo "b" | pass insert -e foo
Signed-off-by: jake <j...@jakejohns.net> --- src/password-store.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/password-store.sh b/src/password-store.sh index e3cd145..2d0cd06 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -428,6 +428,7 @@ cmd_insert() { check_sneaky_paths "$path" set_git "$passfile" + [[ $force -eq 0 && -e $passfile && ! -t 0 ]] && die "An entry already exists for $path." [[ $force -eq 0 && -e $passfile ]] && yesno "An entry already exists for $path. Overwrite it?" mkdir -p -v "$PREFIX/$(dirname -- "$path")" -- 2.15.1 _______________________________________________ Password-Store mailing list Password-Store@lists.zx2c4.com https://lists.zx2c4.com/mailman/listinfo/password-store