diff --git a/bin/kamal b/bin/kamal index 5c8ea6be7..4cdcdc588 100755 --- a/bin/kamal +++ b/bin/kamal @@ -34,9 +34,12 @@ if Fizzy.saas? gem_path = Gem::Specification.find_by_name("fizzy-saas").gem_dir deploy_config = File.join(gem_path, "config", "deploy.yml") - # Add -c option to ARGV if not already present unless ARGV.include?("-c") || ARGV.include?("--config-file") - ARGV.unshift("-c", deploy_config) + if ARGV.empty? || ARGV.first.start_with?("-") + ARGV.unshift("-c", deploy_config) + else + ARGV.insert(1, "-c", deploy_config) + end end end