Skip to content

Return correct exit code from FormatCommand when formatting stdin. #1036

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
Jun 21, 2021

Conversation

munificent
Copy link
Member

It reads from stdin asynchronously. Before this fix, the FormatCommand
did not wait for that to complete before returning the exit code, so it
would return before stdin had been formatted and any parse error
detected.

Fix #1035.

It reads from stdin asynchronously. Before this fix, the FormatCommand
did not wait for that to complete before returning the exit code, so it
would return before stdin had been formatted and any parse error
detected.

Fix #1035.
@munificent munificent requested a review from natebosch June 18, 2021 00:01
@google-cla google-cla bot added the cla: yes label Jun 18, 2021
@mit-mit
Copy link
Member

mit-mit commented Jun 18, 2021

Formatted 47 files (1 changed) in 0.80 seconds.
Error: Process completed with exit code 1.

Oh the irony when a dart_style PR fails the formatting check; you should use for formatter Bob! 😂

@munificent munificent merged commit 41b5c49 into master Jun 21, 2021
@munificent munificent deleted the stdin-exit-code branch June 21, 2021 19:41
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.

dart format should exit non-zero if the source code has errors
3 participants