feat: error out on Procfile extraction if the procfile is invalid

Refs #2991
Refs #3196
This commit is contained in:
Jose Diaz-Gonzalez
2018-07-29 13:01:28 -04:00
parent aeeb2e138f
commit 2db8f93507
10 changed files with 72 additions and 2 deletions

View File

@@ -23,6 +23,9 @@ extract_procfile() {
copy_from_image "$IMAGE" "Procfile" "$DOKKU_PROCFILE" 2>/dev/null || true
if [[ -f "$DOKKU_PROCFILE" ]]; then
dokku_log_info1_quiet "App Procfile file found ($DOKKU_PROCFILE)"
# shellcheck disable=SC2069
PROCFILE_ERRORS="$(procfile-util check "$DOKKU_PROCFILE" 2>&1 >/dev/null || true)"
[[ -n "$PROCFILE_ERRORS" ]] && dokku_log_fail "${PROCFILE_ERRORS}"
else
dokku_log_info1_quiet "No Procfile found in app image"
fi