-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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
.