mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-22 05:01:40 +00:00
Merge pull request #1357 from martgras/patch-1
avoid side effects in _printargs
This commit is contained in:
commit
8f2a8a0051
5
acme.sh
5
acme.sh
@ -139,6 +139,7 @@ __red() {
|
||||
}
|
||||
|
||||
_printargs() {
|
||||
_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() {
|
||||
@ -183,6 +186,7 @@ _dlg_versions() {
|
||||
|
||||
#class
|
||||
_syslog() {
|
||||
_exitstatus="$?"
|
||||
if [ "${SYS_LOG:-$SYSLOG_LEVEL_NONE}" = "$SYSLOG_LEVEL_NONE" ]; then
|
||||
return
|
||||
fi
|
||||
@ -196,6 +200,7 @@ _syslog() {
|
||||
fi
|
||||
fi
|
||||
$__logger_i -t "$PROJECT_NAME" -p "$_logclass" "$(_printargs "$@")" >/dev/null 2>&1
|
||||
return "$_exitstatus"
|
||||
}
|
||||
|
||||
_log() {
|
||||
|
Loading…
Reference in New Issue
Block a user