diff --git a/bin/vagrant-box b/bin/vagrant-box index 1d05c6a23..8833c1fe3 100755 --- a/bin/vagrant-box +++ b/bin/vagrant-box @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "manage boxes" diff --git a/bin/vagrant-down b/bin/vagrant-down index b732dd177..20ccbc389 100755 --- a/bin/vagrant-down +++ b/bin/vagrant-down @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "destroys the vagrant environment" diff --git a/bin/vagrant-halt b/bin/vagrant-halt index a619324d4..04d64e7f0 100755 --- a/bin/vagrant-halt +++ b/bin/vagrant-halt @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "forcibly halts the vagrant environment" diff --git a/bin/vagrant-init b/bin/vagrant-init index 38973f1a4..bd2ae9791 100755 --- a/bin/vagrant-init +++ b/bin/vagrant-init @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "initializes directory for vagrant use" diff --git a/bin/vagrant-package b/bin/vagrant-package index a9bd08adb..de77f1b92 100755 --- a/bin/vagrant-package +++ b/bin/vagrant-package @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "package the current vagrant environment" diff --git a/bin/vagrant-reload b/bin/vagrant-reload index bfc5b9b9c..34280062a 100755 --- a/bin/vagrant-reload +++ b/bin/vagrant-reload @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "reload the vagrant environment" diff --git a/bin/vagrant-resume b/bin/vagrant-resume index d214e44ef..cb8979043 100755 --- a/bin/vagrant-resume +++ b/bin/vagrant-resume @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "resumes the vagrant environment" diff --git a/bin/vagrant-ssh b/bin/vagrant-ssh index 7d7321286..5f5fed1ae 100755 --- a/bin/vagrant-ssh +++ b/bin/vagrant-ssh @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "opens an SSH connection into the VM" diff --git a/bin/vagrant-suspend b/bin/vagrant-suspend index d01de309f..534012d4c 100755 --- a/bin/vagrant-suspend +++ b/bin/vagrant-suspend @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "suspends the vagrant environment" diff --git a/bin/vagrant-up b/bin/vagrant-up index e0fe3f37b..908b621d5 100755 --- a/bin/vagrant-up +++ b/bin/vagrant-up @@ -10,8 +10,7 @@ require 'git-style-binary/command' # Get library libdir = File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift(libdir) unless $:.include?(libdir) -require 'vagrant' +require File.expand_path('vagrant', libdir) GitStyleBinary.command do short_desc "create the vagrant environment" diff --git a/lib/vagrant.rb b/lib/vagrant.rb index 8b67c32c8..fafa85863 100644 --- a/lib/vagrant.rb +++ b/lib/vagrant.rb @@ -1,5 +1,4 @@ libdir = File.dirname(__FILE__) -$:.unshift(libdir) PROJECT_ROOT = File.join(libdir, '..') unless defined?(PROJECT_ROOT) # The libs which must be loaded prior to the rest