Skip to content

Commit 4869a2a

Browse files
authored
[main] Unlock build failed due to enabling nullable (#45411)
2 parents 20ba0c2 + c7fa87f commit 4869a2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Cli/Microsoft.DotNet.Cli.Utils/Command.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public CommandResult Execute(Action<Process>? processStarted)
4141

4242
_process.EnableRaisingEvents = true;
4343

44-
Stopwatch sw = null;
44+
Stopwatch? sw = null;
4545
if (CommandLoggingContext.IsVerbose)
4646
{
4747
sw = Stopwatch.StartNew();
@@ -78,7 +78,7 @@ public CommandResult Execute(Action<Process>? processStarted)
7878
LocalizableStrings.ProcessExitedWithCode,
7979
FormatProcessInfo(_process.StartInfo),
8080
exitCode,
81-
sw.ElapsedMilliseconds);
81+
sw?.ElapsedMilliseconds);
8282
if (exitCode == 0)
8383
{
8484
Reporter.Verbose.WriteLine(message.Green());

0 commit comments

Comments
 (0)