pavloko/source-map-unpack

Process does not signal a failure when an error occurs

RA80533 opened this issue · 2 comments

} catch (err) {
console.log(chalk.red('Oops! Something is wrong with the source map'), err)
console.log(chalk.red('Make sure .min.js is correctly placed under the path specified in .map file'))
console.log('STDERR: ')
console.log(err)
}

Suggestion

  • Cause the process to return a signal code indicative of an error via one of the following:
    1. Set process.exitCode to 1 (recommended; the documentation on process.exit() explains why)
    2. Evaluate process.exit(1)
  • (Optional) Remove one of the two instances of the error being logged

@RA80533 Thanks for raising the concerns and submitting the PRs. I've merged all PRs and will try to address this specific issue in the near future.

#25 address your suggestions. Thank you!