diff --git a/src/Cli/Microsoft.DotNet.Cli.Utils/Command.cs b/src/Cli/Microsoft.DotNet.Cli.Utils/Command.cs index 37906b1dcc1b..d364a769789e 100644 --- a/src/Cli/Microsoft.DotNet.Cli.Utils/Command.cs +++ b/src/Cli/Microsoft.DotNet.Cli.Utils/Command.cs @@ -41,7 +41,7 @@ public CommandResult Execute(Action? processStarted) _process.EnableRaisingEvents = true; - Stopwatch sw = null; + Stopwatch sw = new Stopwatch(); if (CommandLoggingContext.IsVerbose) { sw = Stopwatch.StartNew();