Cleaned up most command string literals and SSH
This commit is contained in:
parent
12ce76ffd0
commit
ce080e908f
|
@ -9,7 +9,7 @@ module Vagrant
|
|||
if vm.created?
|
||||
vm.destroy
|
||||
else
|
||||
vm.env.ui.info "VM not created. Moving on..."
|
||||
vm.env.ui.info "vagrant.commands.common.vm_not_created"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ module Vagrant
|
|||
if vm.created?
|
||||
vm.halt(options)
|
||||
else
|
||||
vm.env.ui.info "VM not created. Moving on..."
|
||||
vm.env.ui.info "vagrant.commands.common.vm_not_created"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ module Vagrant
|
|||
if vm.created? && vm.vm.running?
|
||||
vm.provision
|
||||
else
|
||||
vm.env.ui.info "VM not created. Moving on..."
|
||||
vm.env.ui.info "vagrant.commands.common.vm_not_created"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ module Vagrant
|
|||
if vm.created?
|
||||
vm.reload
|
||||
else
|
||||
vm.env.ui.info "VM not created. Moving on..."
|
||||
vm.env.ui.info "vagrant.commands.common.vm_not_created"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ module Vagrant
|
|||
if vm.created?
|
||||
vm.resume
|
||||
else
|
||||
vm.env.ui.info "VM not created. Moving on..."
|
||||
vm.env.ui.info "vagrant.commands.common.vm_not_created"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,7 +17,7 @@ module Vagrant
|
|||
|
||||
def ssh_execute
|
||||
ssh_vm.ssh.execute do |ssh|
|
||||
ssh_vm.env.ui.info "Execute: #{options[:execute]}"
|
||||
ssh_vm.env.ui.info "vagrant.commands.ssh.execute", :command => options[:execute]
|
||||
ssh.exec!(options[:execute]) do |channel, type, data|
|
||||
ssh_vm.env.ui.info "#{data}"
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ module Vagrant
|
|||
if vm.created?
|
||||
vm.suspend
|
||||
else
|
||||
vm.env.ui.info "VM not created. Moving on..."
|
||||
vm.env.ui.info "vagrant.commands.common.vm_not_created"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ module Vagrant
|
|||
# TODO: Make the options[:provision] actually mean something
|
||||
target_vms.each do |vm|
|
||||
if vm.created?
|
||||
vm.env.ui.info "VM already created. Booting if its not already running..."
|
||||
vm.env.ui.info "vagrant.commands.up.vm_created"
|
||||
vm.start
|
||||
else
|
||||
vm.up
|
||||
|
|
|
@ -5,7 +5,9 @@ module Vagrant
|
|||
register "version", :alias => %w(-v --version)
|
||||
|
||||
def version
|
||||
env.ui.info "Vagrant version #{Vagrant::VERSION}"
|
||||
env.ui.info("vagrant.commands.version.output",
|
||||
:version => Vagrant::VERSION,
|
||||
:_prefix => false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -115,7 +115,6 @@ module Vagrant
|
|||
stat = File.stat(key_path)
|
||||
|
||||
if stat.owned? && file_perms(key_path) != "600"
|
||||
env.ui.info "Permissions on private key incorrect, fixing..."
|
||||
File.chmod(0600, key_path)
|
||||
|
||||
raise Errors::SSHKeyBadPermissions.new(:key_path => key_path) if file_perms(key_path) != "600"
|
||||
|
|
|
@ -58,8 +58,12 @@ en:
|
|||
# Translations for commands. e.g. `vagrant x`
|
||||
#-------------------------------------------------------------------------------
|
||||
commands:
|
||||
common:
|
||||
vm_not_created: "VM not created. Moving on..."
|
||||
box:
|
||||
no_installed_boxes: There are no installed boxes! Use `vagrant box add` to add some.
|
||||
no_installed_boxes: "There are no installed boxes! Use `vagrant box add` to add some."
|
||||
ssh:
|
||||
execute: "Execute: %{command}"
|
||||
status:
|
||||
output: |-
|
||||
Current VM states:
|
||||
|
@ -81,6 +85,10 @@ en:
|
|||
This environment represents multiple VMs. The VMs are all listed
|
||||
above with their current state. For more information about a specific
|
||||
VM, run `vagrant status NAME`.
|
||||
up:
|
||||
vm_created: "VM already created. Booting if its not already running..."
|
||||
version:
|
||||
output: "Vagrant version %{version}"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Translations for Vagrant middleware acions
|
||||
|
|
Loading…
Reference in New Issue