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

Refactor suite-setup-util to avoid knock on errors. #697

Merged

Conversation

rwjblue
Copy link
Collaborator

@rwjblue rwjblue commented Feb 23, 2021

This is a small refactor that does a few things:

  • migrate the manual promise chaining to async/await
  • unify the error handling (so that it is all done in the same way)
  • migrate from process.stderr.write to console.error (process.stderr.write only accepts a string or buffer, if you pass it an instance of Error you get an error that actually masks the real error)
  • migrate to process.exitCode instead of process.exit (forcing exit with process.exit() in general should be avoided, and doesn't seem required in this context)

@rwjblue rwjblue force-pushed the make-suite-setup-util-more-resilient branch from d0a51ce to 33012e2 Compare February 23, 2021 23:06
This is a small refactor that does a few things:

* migrate the manual promise chaining to async/await
* unify the error handling (so that it is all done in the same way)
* migrate from `process.stderr.write` to `console.error`
  (`process.stderr.write` only accepts a string or buffer, if you pass
  it an instance of `Error` you get an error that actually masks the
  _real_ error)
* migrate to `process.exitCode` instead of `process.exit` (forcing exit
  with `process.exit()` _in general_ should be avoided, and doesn't seem
  required in this context)
@rwjblue rwjblue force-pushed the make-suite-setup-util-more-resilient branch from 33012e2 to 50153f4 Compare March 1, 2021 20:48
@rwjblue
Copy link
Collaborator Author

rwjblue commented Mar 1, 2021

Rebased to get the canary build fixes...

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 this pull request may close these issues.

2 participants