You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing out building dotnet/runtime with Docker for Windows, I've discovered that the current support for writing out sdk.txt in InitializeDotNetCli in eng/common/tools.ps1 doesn't handle the case when the file exists from a previous invocation but points to a different location.
As a result, this breaks the scenario of switching between building with the local machine and building with Docker within the same repository (we end up using this file from the ./dotnet.cmd script in our repo root during our native CoreCLR build).
It seems to me that we are usingRename-Item -Force expecting it will force overwrite, but it isn't. The situation would be more complicated if we wanted to bypass discovery in the case of already existing sdk.txt, but that's not the case – we just fail to overwrite after all the expensive action happened.
Let me throw a quick PR to see whether @riarenas agrees.
While testing out building dotnet/runtime with Docker for Windows, I've discovered that the current support for writing out sdk.txt in
InitializeDotNetCli
ineng/common/tools.ps1
doesn't handle the case when the file exists from a previous invocation but points to a different location.As a result, this breaks the scenario of switching between building with the local machine and building with Docker within the same repository (we end up using this file from the
./dotnet.cmd
script in our repo root during our native CoreCLR build).cc: @lukas-lansky
Connected to #6560
The text was updated successfully, but these errors were encountered: