Files
kamal/lib/mrsk/commands/base.rb
2023-01-15 13:50:38 +01:00

25 lines
480 B
Ruby

require "sshkit"
module Mrsk::Commands
class Base
delegate :redact, to: Mrsk::Utils
attr_accessor :config
def initialize(config)
@config = config
end
private
def combine(*commands)
commands
.collect { |command| command + [ "&&" ] }.flatten # Join commands with &&
.tap { |commands| commands.pop } # Remove trailing &&
end
def docker(*args)
args.compact.unshift :docker
end
end
end