Skip to content

Improve ErrorWithExitCode #30

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

Merged
merged 2 commits into from
Feb 6, 2020
Merged

Improve ErrorWithExitCode #30

merged 2 commits into from
Feb 6, 2020

Conversation

yorinasub17
Copy link
Contributor

I noticed that the user experience for returning ErrorWithExitCode isn't quite great, so I made a few improvements here:

  • Support using both WithStackTrace and ErrorWithExitCode, so that you can get both a stack trace and exit with exit code.
  • Output the underlying error message instead of ErrorWithExitCode{ Err = Deployment failed, ExitCode = 1 }
  • Refactor checkForErrorsAndExit so we can test the exit code functionality without the test exiting due to the call to os.Exit.

@yorinasub17 yorinasub17 requested a review from brikis98 as a code owner January 31, 2020 19:07
@yorinasub17
Copy link
Contributor Author

I'm blocked on this in my other PR so going to go ahead and merge+release this, but feedback is still welcome.

@yorinasub17 yorinasub17 merged commit 00c7cf8 into master Feb 6, 2020
@yorinasub17 yorinasub17 deleted the yori-improve-error-exit branch February 6, 2020 16:31
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 this pull request may close these issues.

1 participant