mirror of
https://github.com/sigmasternchen/Pensieve
synced 2025-03-16 00:18:56 +00:00
error messages on stderr
This commit is contained in:
parent
f16d683d70
commit
db6b4ac064
1 changed files with 5 additions and 5 deletions
10
pensieve
10
pensieve
|
@ -57,7 +57,7 @@ quiet || echo
|
||||||
if test "$mode" = "stat"; then
|
if test "$mode" = "stat"; then
|
||||||
content=$(gpg --quiet --batch --passphrase "$password" --decrypt $file 2> /dev/null)
|
content=$(gpg --quiet --batch --passphrase "$password" --decrypt $file 2> /dev/null)
|
||||||
if test $? != 0; then
|
if test $? != 0; then
|
||||||
echo "There was an error while decrypting file. Right passord?"
|
echo "There was an error while decrypting file. Right passord?" 1>&2
|
||||||
exit $EXIT_FAILURE
|
exit $EXIT_FAILURE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ if test "$mode" = "add"; then
|
||||||
if test -f $file; then
|
if test -f $file; then
|
||||||
content=$(gpg --quiet --batch --passphrase "$password" --decrypt $file)
|
content=$(gpg --quiet --batch --passphrase "$password" --decrypt $file)
|
||||||
if test $? != 0; then
|
if test $? != 0; then
|
||||||
echo "There was an error while decrypting file. Right password?"
|
echo "There was an error while decrypting file. Right password?" 1>&2
|
||||||
exit $EXIT_FAILURE
|
exit $EXIT_FAILURE
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
@ -98,7 +98,7 @@ if test "$mode" = "add"; then
|
||||||
|
|
||||||
editor $tmpfile
|
editor $tmpfile
|
||||||
if test $? != 0; then
|
if test $? != 0; then
|
||||||
echo "Editor exited with error. Aborting."
|
echo "Editor exited with error. Aborting." 1>&2
|
||||||
exit $EXIT_FAILURE
|
exit $EXIT_FAILURE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ debug() {
|
||||||
if test "$mode" = "read"; then
|
if test "$mode" = "read"; then
|
||||||
content=$(gpg --quiet --batch --passphrase "$password" --decrypt $file)
|
content=$(gpg --quiet --batch --passphrase "$password" --decrypt $file)
|
||||||
if test $? != 0; then
|
if test $? != 0; then
|
||||||
echo "There was an error while decrypting file. Right password?"
|
echo "There was an error while decrypting file. Right password?"1>&2
|
||||||
exit $EXIT_FAILURE
|
exit $EXIT_FAILURE
|
||||||
fi
|
fi
|
||||||
if test "$epp" != "-1"; then
|
if test "$epp" != "-1"; then
|
||||||
|
@ -162,5 +162,5 @@ if test "$mode" = "read"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Unknown mode."
|
echo "Unknown mode." 1>&2
|
||||||
exit $EXIT_FAILURE
|
exit $EXIT_FAILURE
|
||||||
|
|
Loading…
Reference in a new issue