Skip to content

Commit 945d5fd

Browse files
마누엘Git for Windows Build Agent
마누엘
authored and
Git for Windows Build Agent
committed
path-conversion: Introduce ability to switch off conversion.
When calling windows native apps from MSYS2, the runtime tries to convert commandline arguments by a specific set of rules. See [MinGW wiki] (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, the user can now set the the environment variable `MSYS_NO_PATHCONV` when calling native windows commands. Signed-off-by: 마누엘 <[email protected]>
1 parent 134f1d2 commit 945d5fd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

winsup/cygwin/msys2_path_conv.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,14 @@ path_type find_path_start_and_type(const char** src, int recurse, const char* en
348348
return NONE;
349349
}
350350

351+
/*
352+
* Skip path mangling when environment indicates it.
353+
*/
354+
const char *no_pathconv = getenv ("MSYS_NO_PATHCONV");
355+
356+
if (no_pathconv)
357+
goto skip_p2w;
358+
351359
/*
352360
* Prevent Git's :file.txt and :/message syntax from beeing modified.
353361
*/

0 commit comments

Comments
 (0)