avoid side effects in _printargs

A possible fix for https://github.com/Neilpang/acme.sh/issues/1356
This commit is contained in:
martgras 2018-03-13 12:43:07 +01:00 committed by GitHub
parent a5a0e564dd
commit 52351d7dc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -139,6 +139,7 @@ __red() {
}
_printargs() {
local _exitstatus="$?"
if [ -z "$NO_TIMESTAMP" ] || [ "$NO_TIMESTAMP" = "0" ]; then
printf -- "%s" "[$(date)] "
fi
@ -148,6 +149,8 @@ _printargs() {
printf -- "%s" "$1='$2'"
fi
printf "\n"
# return the saved exit status
return "$_exitstatus"
}
_dlg_versions() {