add additional args to dotnet run help
This commit is contained in:
parent
43c13f2f53
commit
b4cf73ec20
2 changed files with 25 additions and 29 deletions
|
@ -16,14 +16,10 @@ namespace Microsoft.DotNet.Tools.Run
|
||||||
public string Configuration { get; set; }
|
public string Configuration { get; set; }
|
||||||
public string Framework { get; set; }
|
public string Framework { get; set; }
|
||||||
public string Project { get; set; }
|
public string Project { get; set; }
|
||||||
public IReadOnlyList<string> Args { get; set; }
|
public IReadOnlyCollection<string> Args { get; set; }
|
||||||
|
|
||||||
private List<string> _args;
|
private List<string> _args;
|
||||||
|
|
||||||
public RunCommand()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public int Start()
|
public int Start()
|
||||||
{
|
{
|
||||||
Initialize();
|
Initialize();
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.DotNet.Cli.CommandLine;
|
using Microsoft.DotNet.Cli.CommandLine;
|
||||||
using Microsoft.DotNet.Tools.Run;
|
using Microsoft.DotNet.Tools.Run;
|
||||||
using LocalizableStrings = Microsoft.DotNet.Tools.Run.LocalizableStrings;
|
using LocalizableStrings = Microsoft.DotNet.Tools.Run.LocalizableStrings;
|
||||||
|
@ -14,17 +13,17 @@ namespace Microsoft.DotNet.Cli
|
||||||
Create.Command(
|
Create.Command(
|
||||||
"run",
|
"run",
|
||||||
LocalizableStrings.AppFullName,
|
LocalizableStrings.AppFullName,
|
||||||
Accept.ZeroOrMoreArguments()
|
treatUnmatchedTokensAsErrors: false,
|
||||||
.MaterializeAs(o =>
|
arguments: Accept.ZeroOrMoreArguments()
|
||||||
{
|
.MaterializeAs(o => new RunCommand
|
||||||
return new RunCommand()
|
|
||||||
{
|
{
|
||||||
Configuration = o.SingleArgumentOrDefault("--configuration"),
|
Configuration = o.SingleArgumentOrDefault("--configuration"),
|
||||||
Framework = o.SingleArgumentOrDefault("--framework"),
|
Framework = o.SingleArgumentOrDefault("--framework"),
|
||||||
Project = o.SingleArgumentOrDefault("--project"),
|
Project = o.SingleArgumentOrDefault("--project"),
|
||||||
Args = (IReadOnlyList<string>)o.Arguments
|
Args = o.Arguments
|
||||||
};
|
|
||||||
}),
|
}),
|
||||||
|
options: new[]
|
||||||
|
{
|
||||||
CommonOptions.HelpOption(),
|
CommonOptions.HelpOption(),
|
||||||
CommonOptions.ConfigurationOption(),
|
CommonOptions.ConfigurationOption(),
|
||||||
CommonOptions.FrameworkOption(),
|
CommonOptions.FrameworkOption(),
|
||||||
|
@ -35,6 +34,7 @@ namespace Microsoft.DotNet.Cli
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--no-build",
|
"--no-build",
|
||||||
LocalizableStrings.CommandOptionNoBuildDescription,
|
LocalizableStrings.CommandOptionNoBuildDescription,
|
||||||
Accept.NoArguments().ForwardAs("/p:NoBuild=true")));
|
Accept.NoArguments().ForwardAs("/p:NoBuild=true"))
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue