From 20053a71cded829a1c79a578a39b520d47c844b2 Mon Sep 17 00:00:00 2001 From: Yahya Naujid Date: Tue, 15 Sep 2026 10:39:15 +0800 Subject: [PATCH] fix: fall back to default command when Procfile key is missing --- packs/fetch/build/init.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packs/fetch/build/init.sh b/packs/fetch/build/init.sh index a913a0a..2d1fb79 100644 --- a/packs/fetch/build/init.sh +++ b/packs/fetch/build/init.sh @@ -44,7 +44,8 @@ echo "========== write startupscripts based on Procfile" if [ ! -f init_build.sh ]; then if [ -f Procfile ]; then BUILD_CMD=$(cat Procfile | grep build | awk -F ": " '{print $2}') - else + fi + if [ -z "$BUILD_CMD" ]; then BUILD_CMD=$KUBERO_BUILDPACK_DEFAULT_BUILD_CMD fi echo init-build.sh @@ -55,7 +56,8 @@ fi if [ ! -f init-web.sh ]; then if [ -f Procfile ]; then WEB_CMD=$(cat Procfile | grep web | awk -F ": " '{print $2}') - else + fi + if [ -z "$WEB_CMD" ]; then WEB_CMD=$KUBERO_BUILDPACK_DEFAULT_RUN_CMD fi echo init-web.sh @@ -66,7 +68,8 @@ fi if [ ! -f init-worker.sh ]; then if [ -f Procfile ]; then WORKER_CMD=$(cat Procfile | grep worker | awk -F ": " '{print $2}') - else + fi + if [ -z "$WORKER_CMD" ]; then WORKER_CMD=$KUBERO_BUILDPACK_DEFAULT_RUN_CMD fi echo init-worker.sh