diff --git a/vm/haos-vm.sh b/vm/haos-vm.sh index c4f54130..65733214 100644 --- a/vm/haos-vm.sh +++ b/vm/haos-vm.sh @@ -43,7 +43,7 @@ trap 'error_handler $LINENO "$BASH_COMMAND"' ERR trap cleanup EXIT function error_handler() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local exit_code="$?" local line_number="$1" @@ -91,14 +91,14 @@ function msg_info() { } function msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CM} ${GN}${msg}${CL}" } function msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID; fi + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi printf "\e[?25h" local msg="$1" echo -e "${BFR} ${CROSS} ${RD}${msg}${CL}"