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

Handle nonzero exit codes as errors #49

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

tristanlabelle
Copy link
Collaborator

@tristanlabelle tristanlabelle commented Jul 3, 2024

Currently if swiftformat.exe returns a nonzero exit code, result.error is not populated so we proceed with formatting using the empty stdout.

After:
image

@tristanlabelle
Copy link
Collaborator Author

@vinocher-bc too

Copy link
Contributor

@vinocher-bc vinocher-bc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hope this always returns a 0 status when the formatting succeeds.

@tristanlabelle tristanlabelle merged commit b36434b into main Jul 3, 2024
1 check passed
@tristanlabelle tristanlabelle deleted the handle-nonzero-exit-codes branch July 3, 2024 16:51
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.

2 participants