Yield accessory
This commit is contained in:
@@ -93,13 +93,15 @@ class Mrsk::Cli::Accessory < Mrsk::Cli::Base
|
|||||||
else raise "Unknown method: #{options[:method]}"
|
else raise "Unknown method: #{options[:method]}"
|
||||||
end.inquiry
|
end.inquiry
|
||||||
|
|
||||||
if runner.exec_over_ssh?
|
with_accessory(name) do |accessory|
|
||||||
run_locally do
|
if runner.exec_over_ssh?
|
||||||
info "Launching command on #{accessory.host}"
|
run_locally do
|
||||||
exec accessory.exec_over_ssh(cmd, host: accessory.host)
|
info "Launching command on #{accessory.host}"
|
||||||
|
exec accessory.exec_over_ssh(cmd, host: accessory.host)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
on(accessory.host) { puts capture_with_info(*accessory.send(runner, cmd)) }
|
||||||
end
|
end
|
||||||
else
|
|
||||||
on(accessory.host) { puts capture_with_info(*accessory.send(runner, cmd)) }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user