diff --git a/src/dotnet/CommonOptions.cs b/src/dotnet/CommonOptions.cs index c0e6d08d7..8667b5f76 100644 --- a/src/dotnet/CommonOptions.cs +++ b/src/dotnet/CommonOptions.cs @@ -22,7 +22,8 @@ namespace Microsoft.DotNet.Cli "q", "quiet", "m", "minimal", "n", "normal", - "d", "detailed") + "d", "detailed", + "diag", "diagnostic") .ForwardAs(o => $"/verbosity:{o.Arguments.Single()}")); public static ArgumentsRule DefaultToCurrentDirectory(this ArgumentsRule rule) => diff --git a/src/dotnet/commands/dotnet-publish/Program.cs b/src/dotnet/commands/dotnet-publish/Program.cs index c04364f82..6ba893605 100644 --- a/src/dotnet/commands/dotnet-publish/Program.cs +++ b/src/dotnet/commands/dotnet-publish/Program.cs @@ -3,8 +3,10 @@ using System.Collections.Generic; using Microsoft.DotNet.Cli; +using Microsoft.DotNet.Cli.CommandLine; using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Tools.MSBuild; +using Parser = Microsoft.DotNet.Cli.Parser; namespace Microsoft.DotNet.Tools.Publish { @@ -25,6 +27,8 @@ namespace Microsoft.DotNet.Tools.Publish var result = parser.ParseFrom("dotnet publish", args); + Reporter.Output.WriteLine(result.Diagram()); + result.ShowHelpIfRequested(); msbuildArgs.Add("/t:Publish"); diff --git a/src/dotnet/commands/dotnet-restore/Program.cs b/src/dotnet/commands/dotnet-restore/Program.cs index 178648938..537f9a0c9 100644 --- a/src/dotnet/commands/dotnet-restore/Program.cs +++ b/src/dotnet/commands/dotnet-restore/Program.cs @@ -29,10 +29,10 @@ namespace Microsoft.DotNet.Tools.Restore var result = parser.ParseFrom("dotnet restore", args); - result.ShowHelpIfRequested(); - Reporter.Output.WriteLine(result.Diagram()); + result.ShowHelpIfRequested(); + var restore = result["dotnet"]["restore"]; var msbuildArgs = new List