mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-12 18:49:41 -04:00
fix(licenses): print help when no subcommand is specified (#5751)
close #5745
This commit is contained in:
6
.changeset/rotten-mayflies-enjoy.md
Normal file
6
.changeset/rotten-mayflies-enjoy.md
Normal file
@@ -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