16 lines
461 B
Ruby
Executable File
16 lines
461 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
require 'vagrant'
|
|
require 'vagrant/cli'
|
|
|
|
env = Vagrant::Environment.new
|
|
|
|
begin
|
|
Vagrant::CLI.start(ARGV, :env => env)
|
|
rescue Vagrant::Errors::VagrantError => e
|
|
opts = { :_translate => false, :_prefix => false }
|
|
env.ui.error e.message, opts if e.message
|
|
env.ui.error e.backtrace.join("\n"), opts if ENV["VAGRANT_DEBUG"]
|
|
exit e.status_code if e.respond_to?(:status_code)
|
|
exit 999 # An error occurred with no status code defined
|
|
end
|