1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-22 04:10:07 +00:00

fix case where broken wsl docker install still generates output to stdout

This commit is contained in:
Richard Ziegler 2021-06-03 15:33:08 -04:00
parent 76a85e0522
commit 37b87d7e5e

View file

@ -1307,6 +1307,7 @@ function _p9k_prompt_docker_async() {
# Minimize all use of subshells and command invocations in general. # Minimize all use of subshells and command invocations in general.
# Async is not a license to be needlessly slow. # Async is not a license to be needlessly slow.
for line in ${(f)"$( docker ps -a --format 'table {{ .Status }}' 2>/dev/null)"}; do for line in ${(f)"$( docker ps -a --format 'table {{ .Status }}' 2>/dev/null)"}; do
if (( $? )); then break; fi
if [[ "$line" == *(Paused)* ]]; then if [[ "$line" == *(Paused)* ]]; then
(( container_status_counts[P]++ )) (( container_status_counts[P]++ ))
else else