Skip to content

Relative path problem when calling Pandoc Python filter in subfolders (MSYS2 on Windows) #9328

Answered by sdbbs
sdbbs asked this question in Q&A
Discussion options

You must be logged in to vote

Right - I think I can confirm now, that this:

if the MSYS2 version of Python sees an argument which does not look like an UNIX absolute path (i.e. it does not start with a / slash, and has a colon), then it prepends the UNIX path of the current working directory to that path/argument

.... was indeed the culprit.

Note that in MSYS2, you might end up with multiple Python installations, depending on the shell you use:

  1. Under MSYS2 shell of MSYS2, there is this Python (as noted in OP):
    $ python --version
    Python 3.11.6
    
    $ which python
    /usr/bin/python
    
    $ cygpath -w $(which python)
    C:\msys64\usr\bin\python.exe
    
  2. Under MINGW64 shell of MSYS2, there is this Python:
    $ python --version
    Python 3.11…

Replies: 7 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jgm
Comment options

jgm Jan 11, 2024
Maintainer

Answer selected by sdbbs
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants