{"record":{"id":"e4827e3df1651d81","repo":"basecamp/kamal","slug":"unknown-boot-config-subcommand-subcommand","errorCode":null,"errorMessage":"Unknown boot_config subcommand #{subcommand}","messagePattern":"Unknown boot_config subcommand #(.+?)","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/kamal/cli/proxy.rb","lineNumber":102,"sourceCode":"        else\n          execute *proxy.reset_run_command, raise_on_non_zero_exit: false\n        end\n      end\n    when \"get\"\n\n      on(KAMAL.proxy_hosts) do |host|\n        puts \"Host #{host}: #{capture_with_info(*KAMAL.proxy(host).boot_config)}\"\n      end\n    when \"reset\"\n      on(KAMAL.proxy_hosts) do |host|\n        proxy = KAMAL.proxy(host)\n        execute *proxy.reset_boot_options, raise_on_non_zero_exit: false\n        execute *proxy.reset_image, raise_on_non_zero_exit: false\n        execute *proxy.reset_image_version, raise_on_non_zero_exit: false\n        execute *proxy.reset_run_command, raise_on_non_zero_exit: false\n      end\n    else\n      raise ArgumentError, \"Unknown boot_config subcommand #{subcommand}\"\n    end\n  end\n\n  desc \"reboot\", \"Reboot proxy on servers (stop container, remove container, start new container)\"\n  option :rolling, type: :boolean, default: false, desc: \"Reboot proxy on hosts in sequence, rather than in parallel\"\n  option :confirmed, aliases: \"-y\", type: :boolean, default: false, desc: \"Proceed without confirmation question\"\n  def reboot\n    confirming \"This will cause a brief outage on each host. Are you sure?\" do\n      modify(lock: true) do\n        host_groups = options[:rolling] ? KAMAL.proxy_hosts : [ KAMAL.proxy_hosts ]\n        host_groups.each do |hosts|\n          host_list = Array(hosts).join(\",\")\n          run_hook \"pre-proxy-reboot\", hosts: host_list\n          on(hosts) do |host|\n            proxy = KAMAL.proxy(host)\n            execute *KAMAL.auditor.record(\"Rebooted proxy\"), verbosity: :debug\n            execute *KAMAL.registry.login\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/basecamp/kamal/blob/eee0083b38661c3707c6b6052cc89e85038a096c/lib/kamal/cli/proxy.rb#L84-L120","documentation":"`kamal proxy boot_config SUBCOMMAND` manages boot-time proxy configuration (the customizations the proxy persists for kamal-managed options like logging or publish). The command dispatches on the subcommand string — 'show' (and its '?' alias) prints per-host boot config, 'reset' resets boot options/image/version/run-command — and any other first argument falls into the else branch and raises ArgumentError with the unknown subcommand name.","triggerScenarios":"Running `kamal proxy boot_config get`, `... config`, `... list`, or a typo like `... shoe`/`... reste`. Also invoked by wrapper scripts that pass an empty or wrong argument (e.g. `kamal proxy boot_config \"$SUBCMD\"` with SUBCMD unset → dispatches with nil/empty and hits the else).","commonSituations":"Guessing the subcommand name from other kamal commands ('get' vs 'show'); docs/tutorials referencing an older or newer subcommand set; scripts with a variable subcommand that can be empty in CI.","solutions":["Use a supported subcommand: `kamal proxy boot_config show` (alias '?') to display, `kamal proxy boot_config reset` to reset.","Run `kamal proxy boot_config --help` (or `kamal proxy --help`) to list the exact options accepted by your kamal version.","Fix wrapper scripts to validate/whitelist the subcommand before invoking."],"exampleFix":"# before\nkamal proxy boot_config get\n# after\nkamal proxy boot_config show\n# or reset when you want defaults back:\nkamal proxy boot_config reset","handlingStrategy":"validation","validationCode":"SUBCOMMANDS = %w[show ? reset].freeze\nsub = ARGV.shift\nabort \"unknown boot_config subcommand '#{sub}'; use one of #{SUBCOMMANDS.join(', ')}\" unless SUBCOMMANDS.include?(sub)\nsystem(\"kamal proxy boot_config #{sub}\")","typeGuard":"def valid_boot_config_subcommand?(sub)\n  %w[show ? reset].include?(sub)\nend","tryCatchPattern":"begin\n  Kamal::CLI::Proxy.new.invoke(:boot_config, [ sub ])\nrescue ArgumentError => e\n  raise unless e.message.start_with?(\"Unknown boot_config\")\n  warn \"valid subcommands: show (?), reset\"\nend","preventionTips":["Check `kamal proxy --help`/`kamal proxy boot_config --help` after upgrading kamal; subcommands change between versions.","Whitelist subcommands in wrapper scripts; never pass unchecked variables as subcommands."],"tags":["kamal","proxy","cli","invalid-subcommand"],"backgroundTag":"unknown-subcommand","analyzedSha":"eee0083b38661c3707c6b6052cc89e85038a096c","analyzedAt":"2026-08-21T15:17:22.045Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}