add explicit clone
command for NuGet updater
#10864
Merged
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 code is not yet live
The changes in this PR are only relevant for the long-standing work item of rewriting the NuGet updater in C#.
This PR moves the calls to
git clone ...
from the PowerShell script into C#. The reason is that we already have much of the architecture available there to process and report errors.We can now unit test the result of the
git clone ...
commands without actually needing to invoke the tool.The contents of the PowerShell script were also simplified to call the new tool.
There are still two separate calls into the
NuGetUpdater.Cli
tool because that's how an update job is invoked. One call withfetch_files
and another withupdate_files
. This also means that we can easily test either half in isolation; no need to perform a meaningless clone just to test the updater, and no need to prepare a bunch of files just to test the clone behavior.The shape of some of the error types was incorrect and has also been fixed.
I manually verified the following: