diff --git a/.changeset/good-turtles-perform.md b/.changeset/good-turtles-perform.md new file mode 100644 index 0000000000..9e6a1c50e3 --- /dev/null +++ b/.changeset/good-turtles-perform.md @@ -0,0 +1,6 @@ +--- +"@pnpm/plugin-commands-env": patch +"pnpm": patch +--- + +`pnpm env` should print help. diff --git a/env/plugin-commands-env/src/env.ts b/env/plugin-commands-env/src/env.ts index f2ddea9f0d..66283ff836 100644 --- a/env/plugin-commands-env/src/env.ts +++ b/env/plugin-commands-env/src/env.ts @@ -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': {