Correct use ERRORLEVEL in conda scripts for Windows #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I build conda package on Windows in my local environment it fails on tests.
It happens because oneAPI env activation script (part related to FPGA) does
set ERRORLEVEL=1
.As mentioned in this article in cmd.exe scripts
IF ERRORLEVEL 1 ...
checks the last exit value butIF %ERROLEVEL% NEQ 0 ...
checks env variable. The env variable does not relate to last exit status. I think it is error in oneAPI and conda scripts to use env variable instead of exit value.Current CI works without this modifications but my local env does not work without it.
Also, I have tested it with my last commit on branch beta/2021. When I test in master it crashes on python -c "import dppl". It does not relate to this modifications. Just there is an issue between beta/2021 and current master.