Page 1 of 1

The system cannot find the batch label specified

Posted: 11 Feb 2020 11:07
by James
cmd.exe has strange bug of not finding label.

https://github.com/SSCLI/sscli20_20060311
has a file buildall.cmd.

This file stops with the following error message at line 108: goto :BootstrapDone

The system cannot find the batch label specified - BootstrapDone

At line 138 there is the label it is finding :BootstrapDone

If you insert 10 or more characters between line 108 and line 138, this error does not show.
If you insert less than 10 characters, this error occurs.

For example, you can add comments in one of blank lines between line 108 and line 138

rem 56789
rem 567890

The first comment shows error, the second comment prevents error.

buildall.cmd file is made with LF, not CR/LF.
Attached is a reduced buildall.cmd file for you to experiment what I said.
buildall.cmd.txt
(1.57 KiB) Downloaded 547 times

Re: The system cannot find the batch label specified

Posted: 11 Feb 2020 11:31
by jeb
Hi James,

my best guess is that your line endings are LF-only.
Convert them to CR/LF and it should work !
Probably a side effect of your git commit rules, how to handle line endings (autocrlf).

jeb