pygments / pygments.rb

💎 Ruby wrapper for Pygments syntax highlighter
MIT License
572 stars 141 forks source link

When runtime require '/bin/sh' for backtick on windows, ignore errors and use 'python' gracefully. #80

Closed mattn closed 11 years ago

mattn commented 11 years ago

It seens that ruby-2.0.0 or some gems which uses on jekyll require /bin/sh for backtick (backquote?) on windows. But I don't have /bin/sh on my windows. Then, I hope pygments ignore errors, and use python gracefully.

yaauie commented 11 years ago

I can't imagine why /bin/sh dependency would be added to backticks in ruby-2.0, since these have always worked without it; is it possible that you have a which executable on your path that depends on /bin/sh? where which will give you the which executables that are on your path (Windows doesn't supply any, so maybe you got it from elsewhere?)

82 should solve this by not shelling out to which for python executable detection.

mattn commented 11 years ago

Sorry, this is posix-spawn's bug.

https://github.com/rtomayko/posix-spawn/pull/35

tmm1 commented 11 years ago

This requires a new upstream release of posix-spawn.