Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure should result in non-zero exit code #174

Closed
kumavis opened this issue Mar 9, 2020 · 2 comments · Fixed by #180
Closed

Failure should result in non-zero exit code #174

kumavis opened this issue Mar 9, 2020 · 2 comments · Fixed by #180
Labels
Milestone

Comments

@kumavis
Copy link

kumavis commented Mar 9, 2020

Description
command results in error, but completes as if successful

Steps to reproduce

touch empty.js && npx source-map-explorer empty.js && echo 'bug: process ended with non-zero exit code'
empty.js
  Unable to find a source map.
  See https://github.com/danvk/source-map-explorer/blob/master/README.md#generating-source-maps
bug: process ended with non-zero exit code

Files to reproduce
no files needed

Expected behavior
When a fatal error is encountered, it should exit the process with a non-zero exit code

Environment

  • OS: ubuntu
  • source-map-explorer Version: 2.3.1

Additional context
Other errors like failing to find the reference sourcemap file should result in a non-zero exit code

npx source-map-explorer dist/chrome/common.js && echo 'bug: process ended with non-zero exit code'
dist/chrome/common.js
  An error occurred while trying to read the map file at /home/xyz/Development/metamask-extension2/dist/sourcemaps/common.js.map
  Error: ENOENT: no such file or directory, open '/home/xyz/Development/metamask-extension2/dist/sourcemaps/common.js.map'
bug: process ended with non-zero exit code
@nikolay-borzov
Copy link
Collaborator

nikolay-borzov commented Mar 9, 2020

@kumavis, what about the case when there are two bundles and only one failed?

@kumavis
Copy link
Author

kumavis commented Mar 25, 2020

if there was a failure i would expect a non-zero exit code

nikolay-borzov added a commit that referenced this issue Mar 28, 2020
- Set error code to 1 on failure
@nikolay-borzov nikolay-borzov added this to the 2.4.2 milestone Mar 28, 2020
nikolay-borzov added a commit that referenced this issue Mar 28, 2020
- Set error code to 1 on failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants