fix: handle case where image is null on first deploy
This commit is contained in:
1 parent
acc2e84eda
commit
bc70a24e1d
1 file changed
+4
@@ -291,6 +291,10 @@ is_image_herokuish_based() {
|
|||||||
declare IMAGE="$1"
|
declare IMAGE="$1"
|
||||||
local USER_VALUE
|
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
|
# 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="$(docker inspect -f '{{range .Config.Env}}{{if eq . "USER=herokuishuser" }}{{println .}}{{end}}{{end}}' "$IMAGE")"
|
||||||
[[ "$USER_VALUE" == "" ]] && return 1
|
[[ "$USER_VALUE" == "" ]] && return 1
|
||||||
|
|||||||
Reference in new issue
Block a user