diff options
author | Aaron LI <aly@aaronly.me> | 2018-03-11 10:52:20 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-03-11 10:52:20 +0800 |
commit | f9ff96df19bed007aceacdfb4496fd9cbac1d999 (patch) | |
tree | ce58b8b310a8ccf205b2caed8ca703fefa1e606c | |
parent | 7d63e9711b3aec5dd5e0bf3f5bf5c513a36f9159 (diff) | |
download | dfly-update-f9ff96df19bed007aceacdfb4496fd9cbac1d999.tar.bz2 |
Add "|| true" to make debug() work with DEBUG disabled
For reasons unknown, with DEBUG disabled (i.e., DEBUG=""), the script will
terminate after the debug() invocation!
But bash can run this script well without this fix...
-rwxr-xr-x | dfly-update | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dfly-update b/dfly-update index c39c19c..ffc87f8 100755 --- a/dfly-update +++ b/dfly-update @@ -90,7 +90,7 @@ _HAS_UPDATE= # debug() { - [ -n "${DEBUG}" ] && echo "DEBUG: $@" >&2 + [ -n "${DEBUG}" ] && echo "DEBUG: $@" >&2 || true } warn() { |