fix: pnpm env should print help

This commit is contained in:
Zoltan Kochan
2022-12-23 16:09:55 +02:00
parent 29adcae059
commit 4700b095ec
2 changed files with 9 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
---
"@pnpm/plugin-commands-env": patch
"pnpm": patch
---
`pnpm env` should print help.

View File

@@ -83,7 +83,9 @@ export function help () {
export async function handler (opts: NvmNodeCommandOptions, params: string[]) {
if (params.length === 0) {
throw new PnpmError('ENV_NO_SUBCOMMAND', 'Please specify the subcommand')
throw new PnpmError('ENV_NO_SUBCOMMAND', 'Please specify the subcommand', {
hint: help(),
})
}
switch (params[0]) {
case 'use': {