Skip to content

Commit

Permalink
Catch errors in 'running under rubygems' check
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Feb 8, 2009
1 parent b49f3c5 commit b1c85cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ end

# If running under rubygems...
__DIR__ ||= File.expand_path(File.dirname(__FILE__))
if Gem.path.map{|path| Dir.chdir(path){ Dir.pwd } }.any? {|path| %r(^#{Regexp.escape path}) =~ __DIR__}
if Gem.path.map{|path| Dir.chdir(path){ Dir.pwd } rescue path }.any? {|path| %r(^#{Regexp.escape path}) =~ __DIR__}
task :default => :gem_build
else
desc "Build gemspec, then build eventmachine, then run tests."
Expand Down

0 comments on commit b1c85cb

Please sign in to comment.