Skip to content

Build script terminated unexpectedly #55259

@0x5b25

Description

@0x5b25

Description

The python installation detection method in src/coreclr/build-runtime.cmd line 387 might cause batch file to stop unexpectedly without any error., which causes build steps not fully executed and build.cmd falsely reports successful build.

REM Find python and set it to the variable PYTHON
set _C=-c "import sys; sys.stdout.write(sys.executable)"
(py -3 %_C% || py -2 %_C% || python3 %_C% || python2 %_C% || python %_C%) > %TEMP%\pythonlocation.txt 2> NUL
set _C=
set /p PYTHON=<%TEMP%\pythonlocation.txt

I installed chromium depot_tools, added to path, and above code in build-runtime.cmd will terminate batch execution silently after finding python3.bat in depot_tools

image
Image shows no native cpp code is compiled and build.cmd falsely reports build succeeded

Configuration

OS : Windows 10 pro x64
dotnet SDK : 5.0.7 (Maybe not relevant)

Regression?

Tried master, 6.0preview5 and 5.0.7, all suffers from this issue

Other information

adding call before

(py -3 %_C% || py -2 %_C% || python3 %_C% || python2 %_C% || python %_C%) > %TEMP%\pythonlocation.txt 2> NUL

seems to help

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions