nest-cli icon indicating copy to clipboard operation
nest-cli copied to clipboard

Creating a project called help

Open ethansocal opened this issue 2 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

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?

  • [ ] macOS
  • [X] Windows
  • [ ] Linux

Other

No response

ethansocal avatar Jul 11 '23 21:07 ethansocal

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

jmcdo29 avatar Jul 12 '23 01:07 jmcdo29

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:

micalevisk avatar Oct 09 '23 00:10 micalevisk

Should we create a corresponding issue in the commander repository?

kamilmysliwiec avatar Oct 23 '23 11:10 kamilmysliwiec