Looks like a missed case while testing alias feature the v1.3.0 release.
When aliases are defined (whether in the package.json or through the command registry), and the user attempts to run a command without any options (even a base command such as webpack or webpack-test), the parsing short-circuits and displays the help menu. I'm thinking we just need to move around the parsing/return to ensure we fallback to the program.parse(process.argv) if no aliases match.
Without any aliases:
bscot@BSCOTT-PC ~/proj/ (working) -> and-cli webpack-test
[and-cli] Running frontend tests (via npm run test)...
> frontend@0.1.0 test C:\Users\bscot\proj\frontend
> react-scripts test
With an alias in the package.json:
"and-cli": {
"aliases": {
"testdb": "dotnet --cli -- test db migrate"
}
},
bscot@BSCOTT-PC ~/proj/ (working) -> and-cli webpack-test
Usage: and-cli [options] [command]
and-cli command-line tool to manage the development of software applications
Options:
-V, --version output the version number
-h, --help display help for command
Commands:
copy Copy files and/or directories
deploy Deploy various application types
dotnet Run various dotnet commands for the project
dotnet-test Run various dotnet test runner commands for the project
github Commands for interacting with AndcultureCode github resources
install Collection of commands related to installation and configuration of the and-cli
migration Run commands to manage Entity Framework migrations
nuget Manages publishing of nuget dotnet core projects
testdb (alias) dotnet --cli -- test db migrate
webpack Run various webpack commands for the project
webpack-test Run various webpack test commands for the project
help [command] display help for command
Having > 3 arguments (such as a command & some options) seems to be working.
Looks like a missed case while testing alias feature the v1.3.0 release.
When aliases are defined (whether in the package.json or through the command registry), and the user attempts to run a command without any options (even a base command such as
webpack
orwebpack-test
), the parsing short-circuits and displays the help menu. I'm thinking we just need to move around the parsing/return
to ensure we fallback to theprogram.parse(process.argv)
if no aliases match.Without any aliases:
With an alias in the
package.json
:Having > 3 arguments (such as a command & some options) seems to be working.