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,10 +55,15 @@ 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"
puts "Launching Rails console on #{host}..." def console
exec MRSK.app.console(host: host) host = options[:host] || MRSK.config.primary_host
run_locally do
puts "Launching Rails console on #{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"