From 71b578bf1083b07367d617c56d133f35b0b834b3 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 7 Mar 2018 21:48:20 -0500 Subject: [PATCH] fix: Properly handle invalid process type entries during DOKKU_SCALE generation Closes #2991 --- plugins/ps/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ps/functions b/plugins/ps/functions index e4816403f..0db976680 100755 --- a/plugins/ps/functions +++ b/plugins/ps/functions @@ -58,7 +58,7 @@ generate_scale_file() { local NUM_PROCS=0 [[ "$NAME" == "web" ]] && NUM_PROCS=1 [[ -n "$NAME" ]] && echo "$NAME=$NUM_PROCS" >> "$DOKKU_SCALE_FILE" - done < "$DOKKU_PROCFILE" + done < <(egrep -v "^#" "$DOKKU_PROCFILE" | grep ':' | awk -F ':' '{ print $1 }' | sort | uniq) else echo "web=1" >> "$DOKKU_SCALE_FILE" fi