Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InitializeDotNetCli's sdk.txt file does not support updates to different paths on Windows #6915

Closed
2 tasks
jkoritzinsky opened this issue Feb 5, 2021 · 2 comments
Assignees

Comments

@jkoritzinsky
Copy link
Member

  • This issue is blocking
  • This issue is causing unreasonable pain

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).

cc: @lukas-lansky

Connected to #6560

@lukas-lansky
Copy link
Contributor

It seems to me that we are using Rename-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.

@ViktorHofer
Copy link
Member

Fixed by #6918

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants