I'd like to be able to output information from a rake task called by SSHKit but I can't see how to do it.
Say I have the following rake tasks:
require 'sshkit/dsl'
task :hello => :environment do
puts "Hello world"
end
task :sshkit_hello => :environment do
run_locally do
rake "hello"
end
end
If I run the :hello task on it's own I see the "hello world" statement. However, call it from the sshkit task and I just get SSHKit info. How can I write out info from that first rake task that will appear when called from SSHKit?
rake hello
=> Hello world
rake sshkit_hello
=> INFO [f0857f14] Running /usr/bin/env rake hello on
=> INFO [f0857f14] Finished in 6.107 seconds with exit status 0 (successful).
EDIT1:
I've found that you can add the following to get basic terminal output:
SSHKit.config.output = $stdout
but, again, the information outputted is the same - it tells you that it's running 'rake hello' but not the output from 'rake hello'.
rake sshkit_hello
=> rake hello