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

Implement proper return/exit code if bundle process fails #42

Closed
erfanimani opened this issue Jul 22, 2020 · 0 comments · Fixed by #114
Closed

Implement proper return/exit code if bundle process fails #42

erfanimani opened this issue Jul 22, 2020 · 0 comments · Fixed by #114

Comments

@erfanimani
Copy link

erfanimani commented Jul 22, 2020

I.e.

/var/www/html $ bundle
ℹ Using bundling config from "/var/www/html/magepack.config.js".                                                                                                                                                03:49:49

 ERROR  Cannot find module '/var/www/html/magepack.config.js'                                                                                                                                                   03:49:49
Require stack:
- /usr/lib/node_modules/magepack/lib/bundle.js
- /usr/lib/node_modules/magepack/cli.js

  Require stack:
  - /usr/lib/node_modules/magepack/lib/bundle.js
  - /usr/lib/node_modules/magepack/cli.js
  at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
  at Function.Module._load (internal/modules/cjs/loader.js:842:27)
  at Module.require (internal/modules/cjs/loader.js:1026:19)
  at require (internal/modules/cjs/helpers.js:72:18)
  at module.exports (/usr/lib/node_modules/magepack/lib/bundle.js:18:28)
  at Command.<anonymous> (/usr/lib/node_modules/magepack/cli.js:47:32)
  at Command.listener [as _actionHandler] (/usr/lib/node_modules/magepack/node_modules/commander/index.js:413:31)
  at Command._parseCommand (/usr/lib/node_modules/magepack/node_modules/commander/index.js:914:14)
  at Command._dispatchSubcommand (/usr/lib/node_modules/magepack/node_modules/commander/index.js:865:18)
  at Command._parseCommand (/usr/lib/node_modules/magepack/node_modules/commander/index.js:882:12)

/var/www/html $ echo $?
0

Expected return code: 1

Actual return code: 0

This would be very useful for CI/CD. At the moment if an error occurs, the job has no way of knowing whether the process was successful or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant