Permalink
Browse files

Changes to a better way to find racc command when rvm gemset is used.…

… Thanks @wayneeseguin
  • Loading branch information...
1 parent 52c76e0 commit 753836b1608a78515738dc74959f621c71552b2f @yokolet yokolet committed Aug 9, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 Rakefile
View
2 Rakefile
@@ -117,7 +117,7 @@ task 'gem:spec' => 'generate' if Rake::Task.task_defined?("gem:spec")
file GENERATED_PARSER => "lib/nokogiri/css/parser.y" do |t|
racc = RbConfig::CONFIG['target_os'] =~ /mswin32/ ? '' : `which racc`.strip
racc = "#{::RbConfig::CONFIG['bindir']}/racc" if racc.empty?
- racc = "#{ENV['GEM_HOME']}/bin/racc" if racc.empty? && ENV['GEM_HOME']
+ racc = %x{command -v racc}.strip if racc.empty?
sh "#{racc} -l -o #{t.name} #{t.prerequisites.first}"
end

0 comments on commit 753836b

Please sign in to comment.