Browse files

trick rocco into thinking pygmentize is installed

  • Loading branch information...
1 parent b2d37e7 commit 5156338047779e7245fb5b6f323740bf2974c16a @mislav committed Aug 23, 2010
Showing with 12 additions and 1 deletion.
  1. +12 −1 rocco_ext.rb
View
13 rocco_ext.rb
@@ -1,5 +1,16 @@
require 'uv'
-require 'rocco'
+
+begin
+ if ENV['TMPDIR']
+ original_path = ENV['PATH']
+ ENV['PATH'] = ENV['TMPDIR'] + ":" + ENV['PATH']
+ require 'fileutils'
+ FileUtils.touch File.join(ENV['TMPDIR'], 'pygmentize')
+ end
+ require 'rocco'
+ensure
+ ENV['PATH'] = original_path if ENV['TMPDIR']
+end
set :rocco, { :comment_chars => '>', :uv_style => 'dawn' }

0 comments on commit 5156338

Please sign in to comment.