diff options
author | Andre Arko <andre@arko.net> | 2012-05-27 14:22:47 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2012-05-27 14:43:51 -0700 |
commit | 3e769e3b9c50bd2a8cedf12c8f45b17471df0f95 (patch) | |
tree | c0b21010a565283b9fd4eb637fe1506df78e72c0 | |
parent | a65c7a7117b4de6ed4133f2bfaa669162d9df0ac (diff) | |
download | bundler-3e769e3b9c50bd2a8cedf12c8f45b17471df0f95.tar.gz |
guard against double-adding vendor to the load path
-rw-r--r-- | lib/bundler/vendored_thor.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/vendored_thor.rb b/lib/bundler/vendored_thor.rb index bd837ba9e4..a6434268ed 100644 --- a/lib/bundler/vendored_thor.rb +++ b/lib/bundler/vendored_thor.rb @@ -2,6 +2,7 @@ if defined?(Thor) Bundler.ui.warn "Thor has already been required. " + "This may cause Bundler to malfunction in unexpected ways." end -$:.unshift File.expand_path('../vendor', __FILE__) +vendor = File.expand_path('../vendor', __FILE__) +$:.unshift(vendor) unless $:.include?(vendor) require 'thor' require 'thor/actions' |