File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,6 @@ public static void Shutdown(PosixSignalContext context)
131
131
s_sigIntRegistration . Dispose ( ) ;
132
132
s_sigQuitRegistration . Dispose ( ) ;
133
133
s_sigTermRegistration . Dispose ( ) ;
134
- TelemetryClient ? . Flush ( ) ;
135
134
s_mainActivity ? . Stop ( ) ;
136
135
tracerProvider ? . ForceFlush ( ) ;
137
136
metricsProvider ? . ForceFlush ( ) ;
@@ -199,6 +198,17 @@ private static void SetupMSBuildEnvironmentInvariants()
199
198
200
199
private static string GetCommandName ( ParseResult r )
201
200
{
201
+ if ( r . Action is Parser . PrintVersionAction )
202
+ {
203
+ // If the action is PrintVersionAction, we return the command name as "dotnet --version"
204
+ return "dotnet --version" ;
205
+ }
206
+ else if ( r . Action is Parser . PrintInfoAction )
207
+ {
208
+ // If the action is PrintHelpAction, we return the command name as "dotnet --help"
209
+ return "dotnet --info" ;
210
+ }
211
+
202
212
// walk the parent command tree to find the top-level command name and get the full command name for this parseresult
203
213
List < string > parentNames = [ r . CommandResult . Command . Name ] ;
204
214
var current = r . CommandResult . Parent ;
You can’t perform that action at this time.
0 commit comments