nestjs / nest-cli

CLI tool for Nest applications 🍹
https://nestjs.com
Other
1.98k stars 395 forks source link

Creating a project called help #2167

Closed ethansocal closed 5 months ago

ethansocal commented 1 year ago

Is there an existing issue for this?

Current behavior

Creating a project named help doesn't work. Instead, the following is outputted with no prompt for input at all:

image

Minimum reproduction code

N/A

Steps to reproduce

  1. nest new help
  2. The package manager prompt is displayed, along with the help message. Then, it exits immediately. The package manager prompt doesn't let you input anything, as it already just kicks you out of the command.

Expected behavior

A new project named help should be created.

Package version

10.1.8

NestJS version

No response

Node.js version

No response

In which operating systems have you tested?

Other

No response

jmcdo29 commented 1 year ago

Interesting. This looks to be a side effect of commander. I checked with my @ogma/cli package which uses commander under the hood, and got the same immediate help output as if I had passed the --help flag

micalevisk commented 1 year ago

that help message is displayed after calling this line

https://github.com/nestjs/nest-cli/blob/72b272f722fcdd172ee3d49c65ffa3a9e2474170/actions/new.action.ts#L174

but that is not related to our side.

The commander version we're using is too old but as Jay said, this happens in the latest version of commander as well :thinking:

kamilmysliwiec commented 1 year ago

Should we create a corresponding issue in the commander repository?