Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
warn if non-vendored Thor has already been required
Browse files Browse the repository at this point in the history
  • Loading branch information
indirect committed Jun 10, 2011
1 parent 766102a commit 3439848
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions lib/bundler/cli.rb
@@ -1,6 +1,4 @@
$:.unshift File.expand_path('../vendor', __FILE__)
require 'thor'
require 'thor/actions'
require 'bundler/vendored_thor'
require 'rubygems/user_interaction'
require 'rubygems/config_file'

Expand Down
7 changes: 7 additions & 0 deletions lib/bundler/vendored_thor.rb
@@ -0,0 +1,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__)
require 'thor'
require 'thor/actions'

0 comments on commit 3439848

Please sign in to comment.