Fix erroneous \n printed in uninstaller (#8446)
* Fix erroneous \n printed in uninstaller * Fixed shellcheck errors
James Mills committed
Mar 26, 2020 at 09:44 UTC
7cdb949d299b841d213aa682e6428a67380d12fd
1 file changed
+6
-6
packaging/installer/netdata-uninstaller.sh
+6
-6
@@ -119,11 +119,11 @@ setup_terminal() {
119
setup_terminal || echo > /dev/null
120
121
run_ok() {
122
- printf >&2 "%s OK %s %s \n\n" "${TPUT_BGGREEN}${TPUT_WHITE}${TPUT_BOLD}" "${TPUT_RESET}" "${*}"
122
+ printf >&2 "%s OK %s\n\n" "${TPUT_BGGREEN}${TPUT_WHITE}${TPUT_BOLD}" "${TPUT_RESET}"
123
}
124
125
run_failed() {
126
- printf >&2 "%s FAILED %s %s \n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD}" "${TPUT_RESET}" "${*}"
126
+ printf >&2 "%s FAILED %s\n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD}" "${TPUT_RESET}"
127
}
128
129
ESCAPED_PRINT_METHOD=
@@ -159,16 +159,16 @@ run() {
159
160
printf "%s" "${info_console}${TPUT_BOLD}${TPUT_YELLOW}" >&2
161
escaped_print >&2 "${@}"
162
- printf "%s" "${TPUT_RESET}\n" >&2
162
+ printf "%s\n" "${TPUT_RESET}" >&2
163
164
"${@}"
165
166
local ret=$?
167
if [ ${ret} -ne 0 ]; then
168
- run_failed "${*}"
168
+ run_failed
169
printf >> "${run_logfile}" "FAILED with exit code %s\n" "${ret}"
170
else
171
- run_ok "${*}"
171
+ run_ok
172
printf >> "${run_logfile}" "OK\n"
173
fi
174
@@ -187,7 +187,7 @@ portable_del_group() {
187
run groupdel "${groupname}" && return 0
188
else
189
echo >&2 "Group ${groupname} already removed in a previous step."
190
- run_ok "${*}"
190
+ run_ok
191
fi
192
fi
193