Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid erasing files when Ruff fails with an error (#341)
## Summary A user reported an issue in the VS Code extension (astral-sh/ruff#9123) in which their files were being erased on-save. The issue is that we don't check the exit code of all commands, and so if `ruff check` fails with an _error_, then we end up wiping the file entirely. This PR adds exit code-checking for all commands in the LSP. Further, we now surface such failures to the user directly (see bottom right): <img width="1792" alt="Screen Shot 2023-12-13 at 10 57 20 PM" src="https://github.com/astral-sh/ruff-lsp/assets/1309177/14f70b96-5cbd-4d0f-b2a3-532984167724"> Closes astral-sh/ruff#9123
- Loading branch information