Permalink
Browse files

Moved DevKit Environment message to Gem Hook

 * It no longer displays a message when simply using require 'devkit'
 * Fixes bug that causes Gem install to fail when require returns false
  • Loading branch information...
Azolo committed Apr 14, 2012
1 parent ded3058 commit 17c5698ea55d4f2c7a51443ca3d8a0824d238700
Showing with 3 additions and 2 deletions.
  1. +3 −2 resources/devkit/dk.rb.erb
@@ -49,7 +49,9 @@ EOT
# #{DEVKIT_START} override 'gem install' to enable RubyInstaller DevKit usage
Gem.pre_install do |gem_installer|
unless gem_installer.spec.extensions.empty?
- require 'devkit'
+ if require 'devkit'
+ Gem.ui.say 'Temporarily enhancing PATH to include DevKit...' if Gem.configuration.verbose
+ end
end
end
# #{DEVKIT_END}
@@ -62,7 +64,6 @@ EOT
<<-EOT
# enable RubyInstaller DevKit usage as a vendorable helper library
unless ENV['PATH'].include?('#{d}\\\\mingw\\\\bin') then
- puts 'Temporarily enhancing PATH to include DevKit...'
ENV['PATH'] = '#{d}\\\\bin;#{d}\\\\mingw\\\\bin;' + ENV['PATH']
end
ENV['RI_DEVKIT'] = '#{d}'

0 comments on commit 17c5698

Please sign in to comment.