Move HOST option to real option

This commit is contained in:
David Heinemeier Hansson
2023-01-14 12:04:41 +01:00
parent ec31e931bf
commit e3c1992ae9

View File

@@ -55,11 +55,16 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
end end
end end
desc "console [HOST]", "Start Rails Console on primary host (or designated HOST)" desc "console", "Start Rails Console on primary host"
def console(host = MRSK.config.primary_host) option :host, desc: "Start console on a different host"
def console
host = options[:host] || MRSK.config.primary_host
run_locally do
puts "Launching Rails console on #{host}..." puts "Launching Rails console on #{host}..."
exec MRSK.app.console(host: host) exec MRSK.app.console(host: host)
end end
end
desc "runner [EXPRESSION]", "Execute Rails runner with given expression" desc "runner [EXPRESSION]", "Execute Rails runner with given expression"
option :once, type: :boolean, default: false, desc: option :once, type: :boolean, default: false, desc: