diff options
author | EuAndreh <eu@euandre.org> | 2022-05-16 00:09:17 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-05-16 00:09:22 -0300 |
commit | a6e719d167497f406dc494c117e6f032d451f828 (patch) | |
tree | 35a12af89d1cd8e6f7ecaad0950c1cb2218a537e | |
parent | bin/backup: Remove EXIT trap (diff) | |
download | dotfiles-a6e719d167497f406dc494c117e6f032d451f828.tar.gz dotfiles-a6e719d167497f406dc494c117e6f032d451f828.tar.xz |
bin/backup: Fix WARNING message for exit code 0
-rwxr-xr-x | bin/backup | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -111,8 +111,10 @@ run() { ~/ STATUS=$? - if [ "$STATUS" = 0 ] || [ "$STATUS" = 1 ]; then - echo 'WARNING, but no ERROR.' >&2 + if [ "$STATUS" = 0 ]; then + return 0 + elif [ "$STATUS" = 1 ]; then + printf 'WARNING, but no ERROR.\n' >&2 return 0 else return "$STATUS" |