aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-03-11 10:52:20 +0800
committerAaron LI <aly@aaronly.me>2018-03-11 10:52:20 +0800
commitf9ff96df19bed007aceacdfb4496fd9cbac1d999 (patch)
treece58b8b310a8ccf205b2caed8ca703fefa1e606c
parent7d63e9711b3aec5dd5e0bf3f5bf5c513a36f9159 (diff)
downloaddfly-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-xdfly-update2
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() {