fast path Vagrant --version

This commit is contained in:
Mitchell Hashimoto 2014-01-05 15:27:03 -08:00
parent 91751f6e41
commit 817f7f326e
1 changed files with 6 additions and 6 deletions

View File

@ -5,6 +5,12 @@
# initializing which have historically resulted in stack traces.
Signal.trap("INT") { abort }
# Fast path the version of Vagrant
if argv.include?("-v") || argv.include?("--version")
puts "Vagrant #{Vagrant::VERSION}"
exit 0
end
# First, make sure that we're executing using the proper Bundler context
# with our plugins. If we're not, then load that and reload Vagrant.
if !ENV["VAGRANT_INTERNAL_BUNDLERIZED"]
@ -99,12 +105,6 @@ argv.each do |arg|
end
end
# Fast path the version of Vagrant
if argv.include?("-v") || argv.include?("--version")
puts "Vagrant #{Vagrant::VERSION}"
exit 0
end
# Recombine the arguments
argv << "--"
argv += argv_extra