Files
ubicloud/cli-commands/vm/post/sftp.rb
Jeremy Evans 72eb0cb3ea Merge UbiRodish into UbiCli
There is no need for a separate class now.  All of the files in
cli-commands now use UbiCli, instead of a mix of UbiCli and
UbiRodish.
2025-02-19 10:25:42 -08:00

15 lines
358 B
Ruby

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