Only open help page for commands with DocLink

The help-command now handles commands without a DocLink
in the same manner as unknown commands.

Fixes #7065
This commit is contained in:
Mikkel Nylander Bundgaard 2017-08-08 01:06:30 +02:00 committed by William Lee
parent 949b8f8963
commit 5ae335b592

View file

@ -102,7 +102,8 @@ namespace Microsoft.DotNet.Tools.Help
{
if (BuiltInCommandsCatalog.Commands.TryGetValue(
_appliedOption.Arguments.Single(),
out BuiltInCommandMetadata builtIn))
out BuiltInCommandMetadata builtIn) &&
!string.IsNullOrEmpty(builtIn.DocLink))
{
var process = ConfigureProcess(builtIn.DocLink);
process.Start();