Skip to content

Commit

Permalink
[automated] Merge branch 'release/9.0.1xx' => 'release/9.0.2xx' (#44665)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiYanni authored Nov 7, 2024
2 parents 9406078 + f7700e0 commit d960680
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion test/Microsoft.NET.TestFramework/Commands/MSBuildCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,17 @@ public override CommandResult Execute(IEnumerable<string> args)
args = new[] { "/restore" }.Concat(args);
}

return base.Execute(args);
var command = base.Execute(args);

var error = command.StdErr.ToString();
var output = command.StdOut.ToString();
if ((!String.IsNullOrEmpty(error) && error.Contains("NU3003")) || (!String.IsNullOrEmpty(output) && output.Contains("NU3003")))
{
args = args.Concat(new[] { "-v:diag" });
command = base.Execute(args);
}

return command;
}

public CommandResult ExecuteWithoutRestore(IEnumerable<string> args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public static string StripTerminalLoggerProgressIndicators(this string stdout)
{
return stdout
.Replace("\x1b]9;4;3;\x1b\\", "") // indeterminate progress start
.Replace("\x1b]9;4;0;\x1b\\", ""); // indeterminate progress end
.Replace("\x1b]9;4;0;\x1b\\", "") // indeterminate progress end
.Replace("\x1b[?25l", "") // make cursor invisble
.Replace("\x1b[?25h", ""); // make cursor visible
}
}
}

0 comments on commit d960680

Please sign in to comment.