refine.bat file for Windows causing missing label now

2 views
Skip to first unread message

Thad Guidry

unread,
Jul 29, 2021, 8:32:35 PMJul 29
to openref...@googlegroups.com
I got stuck trying to build 4.0 branch and it seems its not working...well refine.bat is complaining.

and simply changing the line endings on refine.bat seems to have fixed the problem!?!?!

E:\GitHubRepos\OpenRefine>refine clean
Using refine.ini for configuration
The system cannot find the batch label specified - endArgumentParsing

E:\GitHubRepos\OpenRefine>refine clean
Using refine.ini for configuration
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] OpenRefine                                                         [pom]
[INFO] OpenRefine - utilities                                             [jar]


Hmm, I often just git checkout as-is and always commit with Unix (LF) (I even have my git config setup with this as most other Windows open source developers do)

Normally on Windows dev machines this wouldn't be an issue at all.
Windows can easily deal with Unix (LF) endings nowadays, but apparently not always the Windows batch file "label scanner" that does part of the parsing for batch files !!!

So it seems I just hit upon this issue against 512 byte chunks with Windows batch file label scanner where a label is at the 512 byte
https://www.dostips.com/forum/viewtopic.php?f=3&t=8988#p58890

How might we best address this without forcing the refine.bat file to be stored and locked with Windows (CR LF) endings?

Perhaps just adding another rem line right before the Argument setting?

rem --- Set Arguments ----------------------------------------------


if ""%1"" == ""/m"" goto arg-m
if ""%1"" == ""/x"" goto arg-x
goto endArgumentParsing

rem --- Set Arguments ----------------------------------------------

:arg-p
set REFINE_PORT=%2
goto shift2loop

:arg-i
set REFINE_INTERFACE=%2
goto shift2loop

Thad Guidry

unread,
Jul 29, 2021, 8:46:12 PMJul 29
to openref...@googlegroups.com
OK, seems like shifting with a rem statement does work.

Probably also could add it to master branch?

Reply all
Reply to author
Forward
0 new messages