Skip to content

Commit

Permalink
fix: pnpm env should print help
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Dec 23, 2022
1 parent 29adcae commit 4700b09
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/good-turtles-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@pnpm/plugin-commands-env": patch
"pnpm": patch
---

`pnpm env` should print help.
4 changes: 3 additions & 1 deletion env/plugin-commands-env/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down

0 comments on commit 4700b09

Please sign in to comment.