hpal icon indicating copy to clipboard operation
hpal copied to clipboard

hpal new outputs an unformatted package.json on ctrl-c'ing on npm init

Open zemccartney opened this issue 5 years ago • 1 comments

Context

  • node version: 10, 12 (specifically, 10.20.0 and 12.16.2)
  • module version with issue: latest (2.4.0)

Steps to reproduce

  1. npx hpal new shreks-in-the-city
  2. Ctrl-C at start of npm init prompt, when the prompt reads "Press ^C at any time to quit".

Expected

  • project directory created
  • directory contains "unflavored" pal boilerplate contents
  • The "Bail on npm init" warning (maybe? wasn't sure about this)
  • package.json is properly formatted, name set to name of working directory (consistent with ctrl+c'ing out of npm init, when run directly) 

Actual

  • project directory created and boilerplate pulled down
  • No bail warning
  • Package.json isn't formatted, unspaced JSON
    • no "name" key set

zemccartney avatar Apr 18 '20 12:04 zemccartney

@devinivy i've done some tinkering with this while working through #38 and #39 , happy to take a crack at this one, too, if it feels worth it

zemccartney avatar Apr 18 '20 12:04 zemccartney