From 9496c8659df9247c6293288ecd12cf30fdbda6ec Mon Sep 17 00:00:00 2001 From: hophacker Date: Wed, 16 Dec 2020 12:19:46 +0800 Subject: [PATCH] allow running against pod with multiple containers --- zsh/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index c7f7ac2..4927b94 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -334,7 +334,7 @@ function kexec { echo $fg[red]"Pod not found for $PROJECT"$reset_color break fi - RUNNING_PODS=($(echo $ALL_PODS | egrep "$PROJECT.* ?1/[0-9]? *Running" | awk '{print $1}')) + RUNNING_PODS=($(echo $ALL_PODS | egrep "$PROJECT.* ?[1-9]/[0-9]? *Running" | awk '{print $1}')) if [[ `echo $ALL_PODS | wc -l` != ${#RUNNING_PODS[@]} ]]; then sleep 2 echo $fg[red]'Pods are not ready, wait...'$reset_color