Skip to content

Commit

Permalink
Improve error experience for Restore command without a project (#45129)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpopMSFT authored Nov 26, 2024
2 parents 5e1bc3c + 12a8505 commit 208df00
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ public override int Execute()

recorder.Run(() =>
{
// First update manifests and install a workload set as necessary
// First discover projects. This may return an error if no projects are found, and we shouldn't delay until after Update if that's the case.
var allProjects = DiscoverAllProjects(Directory.GetCurrentDirectory(), _slnOrProjectArgument).Distinct();

// Then update manifests and install a workload set as necessary
new WorkloadUpdateCommand(_result, recorder: recorder, isRestoring: true).Execute();

var allProjects = DiscoverAllProjects(Directory.GetCurrentDirectory(), _slnOrProjectArgument).Distinct();
List<WorkloadId> allWorkloadId = RunTargetToGetWorkloadIds(allProjects);
Reporter.WriteLine(string.Format(LocalizableStrings.InstallingWorkloads, string.Join(" ", allWorkloadId)));

Expand Down

0 comments on commit 208df00

Please sign in to comment.