Skip to content

dnx: Ambiguities between tool command arguments and dnx arguments #51067

@hez2010

Description

@hez2010

Describe the bug

There're ambiguities between tool command arguments and dnx arguments, which prevents you passing an argument to the tool if the argument is a valid dnx argument.

To Reproduce

dnx dotnet-serve -v

The -v here was meant to enable the Show more console output option of dotnet-serve tool, but it got passed to dnx.

This can also repro on

dnx dotnet-serve --help

which should print the usage of dotnet-serve, instead of the usage of dnx.

Proposed Solution

The current order of dnx arguments is dnx <packageId> [<commandArguments>...] [options], which leads to ambiguities between commandArguments and options.

Instead, I propose to reorder it to dnx [options] <packageId> [<commandArguments>...], so that any argument pass to dnx can be specified before the packageId.

For example,

dnx -y dotnet-serve -v

where -y is passed to dnx, and -v is passed to dotnet-serve.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions