diff --git a/bin/compose-core b/bin/compose-core index 1c85c14..0e4030f 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -3800,7 +3800,7 @@ if [ "$full_init" ]; then fi -if [ "$action" == "run" ]; then +if [ "$action" == "run" -a "${#services_args}" != 0 ]; then charm=$(get_service_charm "${services_args[0]}") || exit 1 metadata=$(charm.metadata "$charm") || exit 1 type="$(printf "%s" "$metadata" | shyaml get-value type 2>/dev/null)" || true