From a6d3bada67996deb8ef0ae692b92fcf1827c6bcb Mon Sep 17 00:00:00 2001 From: miampf Date: Wed, 28 Aug 2024 13:06:19 +0200 Subject: [PATCH] use simpler for loop --- packages/scripts.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/scripts.nix b/packages/scripts.nix index 8f08c0d0f4..d0082fc8a9 100644 --- a/packages/scripts.nix +++ b/packages/scripts.nix @@ -332,7 +332,7 @@ while kubectl get ns "$namespace" 1>/dev/null 2>/dev/null; do pods="$(kubectl get pods -n "$namespace" | awk '!/^NAME/{print $1}')" mkdir -p "workspace/namespace-logs" - while IFS= read -r pod; do + for pod in $pods; do logfile="workspace/namespace-logs/$pod.log" if ! [[ -f "$logfile" ]]; then { @@ -342,7 +342,7 @@ kubectl logs -f --all-containers=true -n "$namespace" "$pod" > "$logfile" } & fi - done <<< "$pods" + done done wait '';