mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-12-24 22:21: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() {
|
_printargs() {
|
||||||
|
_exitstatus="$?"
|
||||||
if [ -z "$NO_TIMESTAMP" ] || [ "$NO_TIMESTAMP" = "0" ]; then
|
if [ -z "$NO_TIMESTAMP" ] || [ "$NO_TIMESTAMP" = "0" ]; then
|
||||||
printf -- "%s" "[$(date)] "
|
printf -- "%s" "[$(date)] "
|
||||||
fi
|
fi
|
||||||
@ -148,6 +149,8 @@ _printargs() {
|
|||||||
printf -- "%s" "$1='$2'"
|
printf -- "%s" "$1='$2'"
|
||||||
fi
|
fi
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
# return the saved exit status
|
||||||
|
return "$_exitstatus"
|
||||||
}
|
}
|
||||||
|
|
||||||
_dlg_versions() {
|
_dlg_versions() {
|
||||||
@ -183,6 +186,7 @@ _dlg_versions() {
|
|||||||
|
|
||||||
#class
|
#class
|
||||||
_syslog() {
|
_syslog() {
|
||||||
|
_exitstatus="$?"
|
||||||
if [ "${SYS_LOG:-$SYSLOG_LEVEL_NONE}" = "$SYSLOG_LEVEL_NONE" ]; then
|
if [ "${SYS_LOG:-$SYSLOG_LEVEL_NONE}" = "$SYSLOG_LEVEL_NONE" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@ -196,6 +200,7 @@ _syslog() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
$__logger_i -t "$PROJECT_NAME" -p "$_logclass" "$(_printargs "$@")" >/dev/null 2>&1
|
$__logger_i -t "$PROJECT_NAME" -p "$_logclass" "$(_printargs "$@")" >/dev/null 2>&1
|
||||||
|
return "$_exitstatus"
|
||||||
}
|
}
|
||||||
|
|
||||||
_log() {
|
_log() {
|
||||||
|
Loading…
Reference in New Issue
Block a user