Skip to content

Commit

Permalink
Improve how we find the path to the rspec exe.
Browse files Browse the repository at this point in the history
On travis, it found `/home/travis/builds/rspec/exe/rspec`,
and that didn't exist. I'm not sure why it didn't find the
one in rspec-core, but I think this'll fix it.
  • Loading branch information
myronmarston committed Aug 26, 2012
1 parent a8d9014 commit cafef45
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions script/find_path_to_rspec_exe
@@ -1,7 +1,13 @@
#!/usr/bin/env ruby

require File.expand_path('../../bundle/bundler/setup', __FILE__)
rspec_core_path = $LOAD_PATH.grep(/rspec-core\/lib$/).first
$LOAD_PATH.each do |path|
next unless path =~ %r|rspec-core/lib$|
rspec_exe = File.expand_path('../exe/rspec', path)

puts File.expand_path('../exe/rspec', rspec_core_path)
if File.exist?(rspec_exe)
puts rspec_exe
exit(0)
end
end

0 comments on commit cafef45

Please sign in to comment.