arcade icon indicating copy to clipboard operation
arcade copied to clipboard

eng/common/tools.ps1 defaults are wrong

Open ViktorHofer opened this issue 6 months ago • 0 comments

https://github.com/dotnet/arcade/blob/b5c8d9f6ae7c14af9e5e162e55201d41ebc191f5/eng/common/tools.ps1#L4-L52

All the bool switch conditions are always true even if the switch isn't supplied to the eng/common/build.ps1 file.

Example: if (Test-Path variable:binaryLog) is always true as binaryLog is defined as a switch which defaults to false and therefore Test-Path is always true.

This mainly affects to switches: binaryLog and nodeReuse. I assume that for that reason, these two got explicitly set in eng/common/build.ps1:

https://github.com/dotnet/arcade/blob/b5c8d9f6ae7c14af9e5e162e55201d41ebc191f5/eng/common/build.ps1#L153-L158

Repro

Remove L153-158 from build.ps1 and run ./eng/common/build.cmd -ci

This affects all custom entry point scripts which import tools.ps1, i.e. aspnetcore, roslyn, fsharp.

ViktorHofer avatar May 27 '25 08:05 ViktorHofer