Apply suggestions from code review
Co-authored-by: Donal McBreen <dmcbreen@gmail.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
class Kamal::Cli::Server < Kamal::Cli::Base
|
||||
desc "exec", "Run a custom command on the server(use --help to show options)"
|
||||
desc "exec", "Run a custom command on the server (use --help to show options)"
|
||||
option :interactive, type: :boolean, aliases: "-i", default: false, desc: "Run the command interactively(use for console/bash)"
|
||||
def exec(cmd)
|
||||
hosts = KAMAL.hosts | KAMAL.accessory_hosts
|
||||
|
||||
case
|
||||
when options[:interactive]
|
||||
host = hosts.first
|
||||
host = KAMAL.primary_host
|
||||
|
||||
say "Running '#{cmd}' on #{host} interactively...", :magenta
|
||||
|
||||
|
||||
Reference in New Issue
Block a user