diff --git a/bin/compose-core b/bin/compose-core index 6c36281..783edf6 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -5616,6 +5616,12 @@ fi >&2 COMPOSE_YML_FILE=$(get_compose_yml_location) || exit 1 COMPOSE_YML_CONTENT=$(get_compose_yml_content) || exit 1 + +if [ -z "$COMPOSE_YML_CONTENT" ]; then + err "Compose file '$HOST_COMPOSE_YML_FILE' is empty." + exit 1 +fi + COMPOSE_YML_CONTENT_HASH=$(compose:yml:hash) || exit 1 CHARM_STORE_HASH=$(charm.store_metadata_hash) || exit 1 COMBINED_HASH=$(H "$COMPOSE_YML_CONTENT_HASH" "$CHARM_STORE_HASH") || exit 1