From b33304a6fa469c2dc51cbf06c9da91f3a070a80f Mon Sep 17 00:00:00 2001 From: Evan Marsland Date: Sun, 22 Nov 2020 10:47:00 -0800 Subject: [PATCH] Allow a directory to a Procfile to be specified I was encountering an issue where a deploy would proceed silently if a directory was provided as a PROCFILE arg. This is because cp does not exit with an error code in this scenario. This change appends `Procfile` to the path if it is a directory. --- bin/compile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/compile b/bin/compile index fe54557..ee65496 100755 --- a/bin/compile +++ b/bin/compile @@ -15,6 +15,11 @@ if [[ -z "${PROCFILE}" ]]; then exit 1 fi +if [ -d "${PROCFILE}" ] ; then + echo "$PROCFILE is a directory, using: $PROCFILE/Procfile"; + PROCFILE=$("$PROCFILE/Procfile") +fi + cp "${BUILD_DIR}/${PROCFILE}" "${BUILD_DIR}/Procfile" if ! [ $? ]; then