Merged
Conversation
92c7516 to
c45d255
Compare
agocke
reviewed
Apr 5, 2025
src/dnvm/RestoreCommand.cs
Outdated
| } | ||
| else | ||
| { | ||
| var error = await InstallCommand.Run(env, logger, new CommandArguments.InstallArguments { SdkVersion = component.Version, Force = options.Force, Verbose = options.Verbose }); |
Collaborator
There was a problem hiding this comment.
Looks like a bit too much reuse. We probably want to call InstallCommand.InstallSdk instead of InstallCommand.Run, since we are not executing an explicitly requested install as requested by the user. If I were going to put any logging associated specifically with the install command, it would probably be in that function.
Contributor
Author
There was a problem hiding this comment.
Updated. If this isn't what you had in mind please let me know. Thanks!
9cec54c to
85f3e95
Compare
Contributor
Author
|
Updated! @agocke , would you mind taking another look? |
agocke
approved these changes
Apr 12, 2025
Collaborator
agocke
left a comment
There was a problem hiding this comment.
LGTM, thanks!
Looks like updating the tests involved lots of boilerplate, but the result looks very thorough. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This changes the behavior of
dnvm restore.Before, restore always did a local restore to the .dotnet directory that matched the global.json. Now the default behavior is to install to the "global" dnvm directory for the user.
This is likely a better default because it allows the user to use
dnvm restoreacross many repos without installing duplicate SDK versions. The previous behavior is available via--local|-l.I also added a log statement to show the global.json parsed and roll forward calculated values. A few times I forgot about roll forward rules and got unexpected results, so the log statement helps explain where blame resides 🙃.