-
Notifications
You must be signed in to change notification settings - Fork 38
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
Unexpected/Incorrect Path Conversion when Exporting Environment Variables #152
Comments
I think you're correct, and this is due to the change where spaces are now considered to be perfectly fine in file/directory names. I'm not quite sure how we can address your scenario without re-breaking the fix where, say, Could you elaborate a bit why the path list in the |
The reason I use paths with forward slashes—
Why is this list not separated by semi-colons? Because it's actually my
I'm not sure I follow, because wouldn't it have to be I'd be happy if there was a (possibly separate) environment variable that disables this behavior, seeing as even |
I think That doesn't negate this issue though, this does seem like a common case to me, at least for a user of mingw32-make. |
Wow, I wasn't even aware that msys2 did that. Thanks for pointing this out :) |
I recently updated my msys and noticed that some Makefile recipes started failing. Basically, whenever more than one path-like string is exported, a weird conversion kicks in that tries to split each single path as if it were a list of paths and then replaces the first forward slash
/
.As far as I understand,
make
exports variables through the environment for subsequent invocations of tools using theexport
command, so this isn't the usual path mangling when using command-line arguments or at least I assume thatmake
does not invoke a second executable and passes the exported data via command-line arguments to achieve this.I reduced this down to the following minimal example:
The Makefile contents are simple:
The output with msys-2.0.dll version
3004.3.0.0
used to be:However with msys-2.0.dll version
3004.6.0.0
the output is:Basically, the each path is treated as if the first colon
:
was actually a separator within a list of paths, then the first forward slash/
is replaced by the msys2 base directory and then the paths are concatenated again using the windows separator for lists of paths, semicolon;
.I strongly suspect this is related to #150, because as one can see, it does not happen with just a single path.
However, curiously this error does not occur when the exported list itself starts with a space, so using
foo: export DOUBLE := $(DOUBLE) $(abspath file2) $(abspath file3)
(DOUBLE
is initially empty) does not trigger this behavior. This leads me to believe this might be a slightly different case.I also noticed that the behavior does not occur when using
SHELL = cmd
, so it's definitely the invocation ofsh.exe
in line 3 of thefoo
recipe that's causing the issue. Unfortunately,MSYS2_ARG_CONV_EXCL
does not have any effect on this.I apologize for the somewhat lengthy issue ;)
The text was updated successfully, but these errors were encountered: