cheminfo / tools

CLI tools to help cheminfo developers
MIT License
2 stars 3 forks source link

fix(cheminfo-publish): show error log when npm publish fails #218

Closed stropitek closed 6 years ago

stropitek commented 6 years ago

I published generator-cheminfo with those changes and it worked fine

Was able to see npm publish error, fix and then publish

stropitek commented 6 years ago

execa() does not work with commands without specifying the full path

You have to use execa.shell()

stropitek commented 6 years ago

Sorry for the bad diff... Prettier...

targos commented 6 years ago

execa() does not work with commands without specifying the full path

That's not true. See how I used it here for example:

https://github.com/nodejs/node-core-utils/blob/74a3a8991de444576a6a04f5f863971c6f9e611a/lib/update-v8/updateV8Clone.js#L23

stropitek commented 6 years ago

I assumed because I had an ENOENT error when trying it with npm

targos commented 6 years ago
> execa('npm', ['--version']).then(console.log)
Promise {
  <pending>,
  domain:
   Domain {
     domain: null,
     _events:
      { removeListener: [Function: updateExceptionCapture],
        newListener: [Function: updateExceptionCapture],
        error: [Function: debugDomainError] },
     _eventsCount: 3,
     _maxListeners: undefined,
     members: [] } }
> { stdout: '6.4.0',
  stderr: '',
  code: 0,
  failed: false,
  killed: false,
  signal: null,
  cmd: 'npm --version',
  timedOut: false }

There seems to be something wrong in your test. What was the command?