Skip to content

Commit 33ef8aa

Browse files
michelroegl-brunnerRögl-Brunner Michel
andauthored
Prevent double spinner (#2203)
Co-authored-by: Rögl-Brunner Michel <[email protected]>
1 parent e989bbb commit 33ef8aa

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

ct/create_lxc.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ function spinner() {
6464

6565
# This function displays an informational message with a yellow color.
6666
function msg_info() {
67+
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
6768
local msg="$1"
6869
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
6970
spinner &

misc/build.func

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ spinner() {
9898

9999
# This function displays an informational message with a yellow color.
100100
msg_info() {
101+
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
101102
local msg="$1"
102103
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
103104
spinner &

misc/install.func

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ spinner() {
9090

9191
# This function displays an informational message with a yellow color.
9292
msg_info() {
93+
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then kill $SPINNER_PID > /dev/null; fi
9394
local msg="$1"
9495
echo -ne "${TAB}${YW}${HOLD}${msg}${HOLD}"
9596
spinner &

0 commit comments

Comments
 (0)