msys2-runtime icon indicating copy to clipboard operation
msys2-runtime copied to clipboard

Recognize path lists starting with absolute or relative paths again

Open dscho opened this issue 1 year ago • 1 comments

When we fixed MSYS2's automatic Unix <-> Windows path conversion to identify and skip Git-style <rev>:<path> arguments (and incidentally also scp-style <host>:<path> ones), we assumed that path lists containing relative paths would be a rare scenario.

My, was this assumption wrong!

Let's add another heuristic that detects absolute paths at the beginning of path lists, and relative ones starting with either ./ or ../, neither of which match those Git-style nor scp-style arguments, and then prevent the detection of the latter style from kicking in.

This addresses https://github.com/msys2/msys2-runtime/issues/208

dscho avatar Apr 17 '24 08:04 dscho

Just integrated the build artifacts 😞

:x:python3 -c "import sys; print(sys.argv)" --dir=/this:./there

  • Actual: ['-c', '--dir=/this:./there']
  • Expected: ['-c', '--dir=C:\\msys64\\this;.\\there']

:x:python3 -c "import sys; print(sys.argv)" --dir=./this:./there

  • Actual: ['-c', '--dir=./this:./there']
  • Expected: ['-c', '--dir=.\\this;.\\there']

:x:python3 -c "import sys; print(sys.argv)" --WEBINPUTS=.:../../../texk/web2c

  • Actual: ['-c', '--WEBINPUTS=.:../../../texk/web2c']
  • Expected: ['-c', '--WEBINPUTS=.;..\\..\\..\\texk\\web2c']

reneparis avatar Apr 17 '24 11:04 reneparis