Merge pull request #1405 from mike-weiner/fix-1399-fail-exec-without-cmd

Raise an error to the user if the exec command parsed is blank
This commit is contained in:
Donal McBreen
2025-04-21 16:16:06 +01:00
committed by GitHub
2 changed files with 11 additions and 0 deletions

View File

@@ -112,6 +112,10 @@ class Kamal::Cli::App < Kamal::Cli::Base
raise ArgumentError, "Detach is not compatible with #{incompatible_options.join(" or ")}"
end
if cmd.empty?
raise ArgumentError, "No command provided. You must specify a command to execute."
end
cmd = Kamal::Utils.join_commands(cmd)
env = options[:env]
detach = options[:detach]