create-react-hook icon indicating copy to clipboard operation
create-react-hook copied to clipboard

Freezes on invalid name

Open eruizc-dev opened this issue 4 years ago • 0 comments

Issue

Attempt to create a new package with an invalid name (not from params) causes the program to freeze.

Repro steps

  1. Call create-react-hook with no params
  2. When asked for package name include caps on it, for example myPackageName
  3. Program freezes

Expected

Program should not freeze and print some sort of message

Workaround

The program is freezing on an error because package names should not include caps. Include the name as a param create-react-hook myPackageName and you will see the actual error:

Error: invalid package name "myPackageName"...

Additional notes

As I previously said, adding an invalid name from params prints the error. I expect them to behave similarly.

eruizc-dev avatar Nov 21 '20 05:11 eruizc-dev