From bc70a24e1df3e7413b1291c2c188d7f869c8e989 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 12 May 2019 07:37:21 -0400 Subject: [PATCH] fix: handle case where image is null on first deploy --- plugins/common/functions | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/common/functions b/plugins/common/functions index a5e7eaf19..8c3f59296 100755 --- a/plugins/common/functions +++ b/plugins/common/functions @@ -291,6 +291,10 @@ is_image_herokuish_based() { declare IMAGE="$1" local USER_VALUE + if [[ -z "$IMAGE" ]]; then + return 1 + fi + # due to how the build process works, all herokuish images have the Environment variable USER=herokuishuser USER_VALUE="$(docker inspect -f '{{range .Config.Env}}{{if eq . "USER=herokuishuser" }}{{println .}}{{end}}{{end}}' "$IMAGE")" [[ "$USER_VALUE" == "" ]] && return 1