From a60252c20441700476c496838eee687e2dcbc00c Mon Sep 17 00:00:00 2001 From: Manabu Matsui Date: Thu, 15 Nov 2018 14:21:54 +0900 Subject: [PATCH] Fix job completion judgement in spin() Fix #11 --- installer.zsh | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/installer.zsh b/installer.zsh index 2debeca..73ef663 100644 --- a/installer.zsh +++ b/installer.zsh @@ -40,18 +40,7 @@ spin() printf " $fg[white]$spinner$reset_color $before_msg\r" 2>/dev/null done - echo "$jobstates" \ - | awk ' - /[0-9]+=/ { - jobs[++job_count] = $0 - } - END { - for (i = 1; i <= job_count; i++) { - print(jobs[i]) - } - exit job_count == 0 - }' \ - | xargs test -z && break + [ $#jobstates = 0 ] && break done if [[ -n $after_msg ]]; then