fix(licenses): print help when no subcommand is specified (#5751)
close #5745
This commit is contained in:
1 parent
c5aea50ae1
commit
568dc3ab21
2 files changed
+9
-1
No files matched your search
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-licenses": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`pnpm licenses` should print help, not just an error message [#5745](https://github.com/pnpm/pnpm/issues/5745).
|
||||
@@ -85,7 +85,9 @@ export async function handler (
|
||||
params: string[] = []
|
||||
) {
|
||||
if (params.length === 0) {
|
||||
throw new PnpmError('LICENCES_NO_SUBCOMMAND', 'Please specify the subcommand')
|
||||
throw new PnpmError('LICENCES_NO_SUBCOMMAND', 'Please specify the subcommand', {
|
||||
hint: help(),
|
||||
})
|
||||
}
|
||||
switch (params[0]) {
|
||||
case 'list':
|
||||
|
||||
Reference in new issue
Block a user