Skip to content

Commit 37bb18c

Browse files
fix #256 by changing python Windows search heuristic (#257)
1 parent cc5cb84 commit 37bb18c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/pygments/popen.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ def popen4(argv)
196196
# Detect a suitable Python binary to use.
197197
def find_python_binary
198198
if Gem.win_platform?
199+
return 'python3' if which('python3')
200+
return 'python' if which('python')
199201
return %w[py -3] if which('py')
200-
201-
return [%w[python3 python].find { |py| !which(py).nil? }]
202202
end
203203

204204
# On non-Windows platforms, we simply rely on shebang

0 commit comments

Comments
 (0)