From 1a4f461ae55a8528c8789bbd4aebde2ba896f75a Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Tue, 31 Dec 2024 01:36:19 +0200 Subject: [PATCH] Fix spinner to be simple to work in non-interactive CI/CD --- .github/build/functions.bash | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/build/functions.bash b/.github/build/functions.bash index b32b55563..8145f2342 100755 --- a/.github/build/functions.bash +++ b/.github/build/functions.bash @@ -349,17 +349,12 @@ adjust_module_filename() { } spinner() { - local msg=$1 - local pid=$! - local spin='-\|/' - local i=0 - printf "%s " "$msg" - while kill -0 $pid 2>/dev/null; do - (( i = (i + 1) % 4 )) - # No spinner if not an interactive shell - if [ -n "$PS1" ]; then - printf '%c\b' "${spin:i:1}" - fi - sleep .1 - done + local msg=$1 + local pid=$! + printf "%s " "$msg" + while kill -0 $pid 2>/dev/null; do + printf "." + sleep 1 + done + printf "\n" }