Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recognize path lists starting with absolute or relative paths again #212

Draft
wants to merge 1 commit into
base: msys2-3.4.10
Choose a base branch
from

Conversation

dscho
Copy link
Collaborator

@dscho dscho commented Apr 17, 2024

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 #208

…nvironment variables to Windows form for native Win32 applications.

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 msys2#208

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho self-assigned this Apr 17, 2024
@reneparis
Copy link

Just integrated the build artifacts 😞

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

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

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

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants