Class: VagrantPlugins::Jenv::Command
- Inherits:
-
Object
- Object
- VagrantPlugins::Jenv::Command
- Defined in:
- lib/vagrant-jenv/command.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.synopsis ⇒ String
6 7 8 |
# File 'lib/vagrant-jenv/command.rb', line 6 def self.synopsis "Display jenv version" end |
Instance Method Details
#execute ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/vagrant-jenv/command.rb', line 10 def execute # Execute the actual SSH with_target_vms(nil, single_target: true) do |vm| vm.config.exec.finalize! # TODO: do we have to call it explicitly? @logger.info("Detect jenv version: ") ssh_opts = {extra_args: ['-q']} # make it quiet env = vm.action(:ssh_run, ssh_run_command: "jenv version", ssh_opts: ssh_opts) status = env[:ssh_run_exit_status] || 0 return status end end |