I'm not sure where the correct repository or place is to report this issue. I'm happy to report it elsewhere if wanted. Also, if it's a non-issue it doesn't matter to me (and I'm happy if it's closed without solving it). I'm reporting it for the chance that it may matter.
Describe the bug
I am probably the only person on Earth who has or will encounter this particular bug, as it results in modifications to msys2_shell.cmd which possibly I only have made. Even so, I'm reporting it as it may indicate potential other issues.
If a comment of a very particular form exists in the msys2_shell.cmd file, the MSYS2 terminal fails to launch, with error code 126.
Steps to Reproduce the Problem
Change all of the comments in msys2_shell.cmd to begin with the :: comment demarker instead of rem, so that for example this:
rem To export full current PATH from environment into MSYS2 use '-use-full-path' parameter
rem or uncomment next line
Becomes this:
:: To export full current PATH from environment into MSYS2 use '-use-full-path' parameter
:: or uncomment next line
Run msys2_shell.cmd.
Instead of luanching the MSYS2 terminal, it stops with this error:
C:\msys64: C:\msys64: Is a directory
/usr/bin/bash: Exit 126.
I isolated the problem to what seems to be a very particular form of (modified) comment on these two lines in msys2_shell.cmd:
:: Increment msys2_shiftCounter by number of words in argument (as cmd.exe saw it).
:: (Note that this form of FOR IN loop uses same delimiters as parameters.)
With those parenthesis around the second line of that comment block, this error occurs. But if I remove the parenthesis, like this:
:: Increment msys2_shiftCounter by number of words in argument (as cmd.exe saw it).
:: Note that this form of FOR IN loop uses same delimiters as parameters.
Then msys2_shell.cmd launches the MSYS2 terminal without error.
It gets even weirder.
A comment demarker by itself with two colons :: and then a comment in parenthesis, like this, by itself:
:: (comment)
Will not cause this error.
No, it has to come immediately after a comment with characters not surrounded by parenthesis:
:: comment
:: (comment)
It seems moreover that having a closing parenthesis anywhere on a comment immediately following another comment is what the issue pattern may be.
Additional Context: Operating System, Screenshots
Duplicated on Windows 7 Professional (last release fully up to date with all patches) and Windows Home v10.0.18363 Build 18363.
msys2-x86-64-20200555.exe installed into Windows 10.
Replaced all "rem" with "::" in msys2_shell.cmd file...
Do not get any error message, things works just the same.
My 2 cents.
I'm not sure where the correct repository or place is to report this issue. I'm happy to report it elsewhere if wanted. Also, if it's a non-issue it doesn't matter to me (and I'm happy if it's closed without solving it). I'm reporting it for the chance that it may matter.
Describe the bug
I am probably the only person on Earth who has or will encounter this particular bug, as it results in modifications to
msys2_shell.cmd
which possibly I only have made. Even so, I'm reporting it as it may indicate potential other issues.If a comment of a very particular form exists in the
msys2_shell.cmd
file, the MSYS2 terminal fails to launch, with error code 126.Steps to Reproduce the Problem
msys2_shell.cmd
to begin with the::
comment demarker instead ofrem
, so that for example this:Becomes this:
msys2_shell.cmd
.Instead of luanching the MSYS2 terminal, it stops with this error:
I isolated the problem to what seems to be a very particular form of (modified) comment on these two lines in
msys2_shell.cmd
:With those parenthesis around the second line of that comment block, this error occurs. But if I remove the parenthesis, like this:
Then
msys2_shell.cmd
launches the MSYS2 terminal without error.It gets even weirder.
A comment demarker by itself with two colons
::
and then a comment in parenthesis, like this, by itself:Will not cause this error.
No, it has to come immediately after a comment with characters not surrounded by parenthesis:
It seems moreover that having a closing parenthesis anywhere on a comment immediately following another comment is what the issue pattern may be.
Additional Context: Operating System, Screenshots
Duplicated on Windows 7 Professional (last release fully up to date with all patches) and Windows Home v10.0.18363 Build 18363.