@@ -679,7 +679,10 @@ def _ensure_pandoc_path() -> None:
679
679
search_paths = ["pandoc" , included_pandoc ]
680
680
pf = "linux" if sys .platform .startswith ("linux" ) else sys .platform
681
681
try :
682
- search_paths .append (os .path .join (DEFAULT_TARGET_FOLDER [pf ], "pandoc" ))
682
+ if pf == "win32" :
683
+ search_paths .append (os .path .join (DEFAULT_TARGET_FOLDER [pf ], "pandoc.exe" ))
684
+ else :
685
+ search_paths .append (os .path .join (DEFAULT_TARGET_FOLDER [pf ], "pandoc" ))
683
686
except : # noqa
684
687
# not one of the know platforms...
685
688
pass
@@ -689,16 +692,19 @@ def _ensure_pandoc_path() -> None:
689
692
# Also add the interpreter script path, as that's where pandoc could be
690
693
# installed if it's an environment and the environment wasn't activated
691
694
if pf == "win32" :
692
- search_paths .append (os .path .join (sys .exec_prefix , "Scripts" , "pandoc" ))
695
+ search_paths .append (os .path .join (sys .exec_prefix , "Scripts" , "pandoc.exe " ))
693
696
694
697
# Since this only runs on Windows, use Windows slashes
695
698
if os .getenv ('ProgramFiles' , None ):
696
- search_paths .append (os .path .expandvars ("${ProgramFiles}\\ Pandoc\\ Pandoc" ))
699
+ search_paths .append (os .path .expandvars ("${ProgramFiles}\\ Pandoc\\ pandoc.exe" ))
700
+ search_paths .append (os .path .expandvars ("${ProgramFiles}\\ Pandoc\\ Pandoc.exe" ))
697
701
if os .getenv ('ProgramFiles(x86)' , None ):
698
- search_paths .append (os .path .expandvars ("${ProgramFiles(x86)}\\ Pandoc\\ Pandoc" ))
702
+ search_paths .append (os .path .expandvars ("${ProgramFiles(x86)}\\ Pandoc\\ pandoc.exe" ))
703
+ search_paths .append (os .path .expandvars ("${ProgramFiles(x86)}\\ Pandoc\\ Pandoc.exe" ))
699
704
700
705
# bin can also be used on windows (conda at least has it in path), so
701
706
# include it unconditionally
707
+ search_paths .append (os .path .join (sys .exec_prefix , "bin" , "pandoc.exe" ))
702
708
search_paths .append (os .path .join (sys .exec_prefix , "bin" , "pandoc" ))
703
709
# If a user added the complete path to pandoc to an env, use that as the
704
710
# only way to get pandoc so that a user can overwrite even a higher
0 commit comments