Skip to content

Commit

Permalink
chore: Adjust markers
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Nov 7, 2024
1 parent 79264dd commit 08913c9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions UnoCheck/DotNet/DotNetWorkloadManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ string WriteRollbackFile(Manifest.DotNetWorkload[] workloads)
const string RollbackOutputBeginMarker = "==workloadRollbackDefinitionJsonOutputStart==";
const string RollbackOutputEndMarker = "==workloadRollbackDefinitionJsonOutputEnd==";

public async Task<string[]> GetInstalledWorkloads()
const string ListOutputBeginMarker = "==workloadListJsonOutputStart==";
const string ListOutputEndMarker = "==workloadListJsonOutputEnd==";

public async Task<string[]> GetInstalledWorkloads()
{
var dotnetExe = Path.Combine(SdkRoot, DotNetSdk.DotNetExeName);

Expand All @@ -107,8 +110,8 @@ public async Task<string[]> GetInstalledWorkloads()

if (isNet8OrBelow)
{
var startIndex = output.IndexOf(RollbackOutputBeginMarker);
var endIndex = output.IndexOf(RollbackOutputEndMarker);
var startIndex = output.IndexOf(ListOutputBeginMarker);
var endIndex = output.IndexOf(ListOutputEndMarker);

if (startIndex >= 0 && endIndex >= 0)
{
Expand Down

0 comments on commit 08913c9

Please sign in to comment.