Files
ubicloud/cli-commands/vm/post/sftp.rb
Jeremy Evans cbf2d95cbb Revert the backout of the CLI support
This reverts commit b741fe9005.

This was backed out as problems started occuring shortly after
a large CLI pull request was merged.  However, log analysis
shows that the CLI was unrelated to the problems.
2025-02-11 16:09:46 -08:00

15 lines
293 B
Ruby

# frozen_string_literal: true
UbiRodish.on("vm").run_on("sftp") do
skip_option_parsing
args(0...)
run do |argv, opts|
handle_ssh(opts) do |user:, address:|
address = "[#{address}]" if address.include?(":")
["sftp", *argv, "--", "#{user}@#{address}"]
end
end
end