path-conversion: introduce ability to switch off conversion. #181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When calling windows native apps from MSYS2, the runtime tries to convert commandline arguments by a specific set of rules. This idea was inherited from the MSys/MinGW project (which is now seemingly stale, yet must be credited with championing this useful feature, see MinGW wiki https://web.archive.org/web/20201112005258/http://www.mingw.org/wiki/Posix_path_conversion).
If the user does not want that behavior on a big scale, e.g. inside a Bash script, with the changes introduced in this commit, the user can now set the the environment variable
MSYS_NO_PATHCONV
when calling native windows commands.This is a feature that has been introduced in Git for Windows already in 2015 (read: a loooong time ago) via git-for-windows/msys2-runtime#11 and it predates support for the
MSYS2_ENV_CONV_EXCL
andMSYS2_ARG_CONV_EXCL
environment variables in the MSYS2 runtime; Many users find the simplicity ofMSYS_NO_PATHCONV
appealing.Git for Windows users have grown accustomed to the convenience of setting
MSYS_NO_PATHCONV
, and MSYS2 users are likely to enjoy it, too, so let's teach MSYS2 proper this simple trick that still allows using the sophisticatedMSYS2_*_CONV_EXCL
facilities but also offers a convenient catch-all "just don't convert anything" knob.This PR is part of the effort described in msys2/MINGW-packages#16383.