feat: supports the default command fallback when command not found ( resolved #277 )#139
feat: supports the default command fallback when command not found ( resolved #277 )#139snowyu wants to merge 1 commit intooclif:mainfrom
Conversation
|
Thanks for the contribution! Before we can merge this, we need @snowyu to sign the Salesforce.com Contributor License Agreement. |
16b76f1 to
a3a7850
Compare
Codecov Report
@@ Coverage Diff @@
## master #139 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 2 2
Lines 12 12
Branches 3 3
======================================
Misses 12 12 Continue to review full report at Codecov.
|
|
You should do this with the |
|
if (!c) {
await this.runHook('command_not_found', {id})
throw new CLIError(`command ${id} not found`) |
|
You are correct, I misread earlier. See my comment oclif/oclif#277 (comment) on adding a root index command. Thanks for the PR on this! I really don't like to not use your efforts, but this particular solution was an edge case that was easier for me to write than explain. |
add an alias 'default' to set a default command.