Write output from `sh' task action directly:
* Accept output as argument in Remote#execute; * Modify ShellCommand so that env output is directly handled.
This commit is contained in:
@@ -23,8 +23,7 @@ module Producer
|
||||
@fs ||= Remote::FS.new(session.sftp.connect)
|
||||
end
|
||||
|
||||
def execute(command)
|
||||
output = ''
|
||||
def execute(command, output = '')
|
||||
channel = session.open_channel do |channel|
|
||||
channel.exec command do |ch, success|
|
||||
ch.on_data do |c, data|
|
||||
|
Reference in New Issue
Block a user