Closed bbourgier closed 7 years ago
Hi, I don't understand why you're doing this: Sourcing the library should only be done once. Afterwards, all the library resources are available to the calling script. If I were to make a change, it would be to insert a test at the very beginning of library.bat, and immediately return on an attempt to source it again.
Hi, The call sequence I told you about was just a sum up to do my case. In fact load calls are not done at all at the same place. And I understand your remark. However as long as it is possible to load several time, then this error case should probably be handled internally to the library in order to avoid multi-loading while sourcing. Therefore yes, if you could handle this case internally, this would be great indeed! Thks again.
I tried reproducing the issue, but I don't get any error. Please try again with the updated Library.bat that I just checked in. It contains several overdue changes, including one that affects the %LCALL% macro. Maybe this will help on your system. (Note that I also tried the test with the 2016-12-16 version, and I did not get any error either.) What version of Windows are you using?
Hi, Forget about it. The issue was due to the wrong EOL encoding when I copy pasted your code from github. For some strange reason it was Unix encoding (CR). When converting it to Windows encoding (CRLF) everything works well. I don't have the "cannot find batch label" error anymore. Thank you for your patience :-)
Hi,
I was trying and use your Library.bat framework in a script of mine, by sourcing it. Library.bat version 2016-12-16 And I happened to have the following sequence call:
and I get the following error:
I looked at Library.bat and I found a surprising fix to this error: Add a simple comment line after the line:
goto :Debug.%DEBUG%
Which gives for instance:
Do you validate this fix?
Thks.