bcomnes / sublime-standard-format

:sparkles: Runs standard --fix against the javascript in your ST3 window on save or manually.
https://packagecontrol.io/packages/StandardFormat
MIT License
60 stars 21 forks source link

Do not replace the view with return code other than 0 #76

Closed ungive closed 3 years ago

ungive commented 3 years ago

Fixes a bug that I encountered when the linter fails but doesn't write anything to stderr. The output from stdout is written to the file, replacing all the code with nothing or an error message. This is fixed by also checking the return code, i.e. if it's zero or not and branching accordingly.

bcomnes commented 3 years ago

Oh good call. I feel like I've seen this before, but very rarely. Will review and release this week. Thanks for the contrib!

bcomnes commented 3 years ago

Published in 6.2.2 should be live soon on Package Control!