fix: pnpm env should print help

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

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
---
"@pnpm/plugin-commands-env": patch
"pnpm": patch
---
`pnpm env` should print help.
+3 -1
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': {