Skip to content

Commit

Permalink
Fix job completion judgement in spin()
Browse files Browse the repository at this point in the history
  • Loading branch information
crhg committed Nov 15, 2018
1 parent 408816a commit a60252c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions installer.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a60252c

Please sign in to comment.