Merge branch 'master' into merges/release/15.5-to-master-20171031-070033
This commit is contained in:
commit
2031c9cf33
427 changed files with 3948 additions and 6665 deletions
|
@ -77,7 +77,6 @@ namespace Microsoft.DotNet.Cli
|
|||
{
|
||||
// CommandLineApplication is a bit restrictive, so we parse things ourselves here. Individual apps should use CLA.
|
||||
|
||||
bool? verbose = null;
|
||||
var success = true;
|
||||
var command = string.Empty;
|
||||
var lastArg = 0;
|
||||
|
@ -92,7 +91,8 @@ namespace Microsoft.DotNet.Cli
|
|||
{
|
||||
if (IsArg(args[lastArg], "d", "diagnostics"))
|
||||
{
|
||||
verbose = true;
|
||||
Environment.SetEnvironmentVariable(CommandContext.Variables.Verbose, bool.TrueString);
|
||||
CommandContext.SetVerbose(true);
|
||||
}
|
||||
else if (IsArg(args[lastArg], "version"))
|
||||
{
|
||||
|
@ -159,9 +159,8 @@ namespace Microsoft.DotNet.Cli
|
|||
? Enumerable.Empty<string>()
|
||||
: args.Skip(lastArg + 1).ToArray();
|
||||
|
||||
if (verbose.HasValue)
|
||||
if (CommandContext.IsVerbose())
|
||||
{
|
||||
Environment.SetEnvironmentVariable(CommandContext.Variables.Verbose, verbose.ToString());
|
||||
Console.WriteLine($"Telemetry is: {(telemetryClient.Enabled ? "Enabled" : "Disabled")}");
|
||||
}
|
||||
|
||||
|
@ -171,6 +170,7 @@ namespace Microsoft.DotNet.Cli
|
|||
if (BuiltInCommandsCatalog.Commands.TryGetValue(topLevelCommandParserResult.Command, out var builtIn))
|
||||
{
|
||||
TelemetryEventEntry.SendFiltered(Parser.Instance.ParseFrom($"dotnet {topLevelCommandParserResult.Command}", appArgs.ToArray()));
|
||||
|
||||
exitCode = builtIn.Command(appArgs.ToArray());
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue