]> git.lizzy.rs Git - rust.git/commitdiff
Merge #10334
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Fri, 24 Sep 2021 17:07:18 +0000 (17:07 +0000)
committerGitHub <noreply@github.com>
Fri, 24 Sep 2021 17:07:18 +0000 (17:07 +0000)
10334: Give rustfmt spawn error context. r=jonas-schievink a=aDotInTheVoid

This mean if you misconfigure to

```json
{
    "rust-analyzer.rustfmt.overrideCommand": [
        "./nonono"
    ]
}
```

The error message is

```
[Error - 17:54:33] Request textDocument/formatting failed.
  Message: Failed to spawn "./nonono"
  Code: -32603
```

instead of

```
[Error - 17:56:12] Request textDocument/formatting failed.
  Message: No such file or directory (os error 2)
  Code: -32603
```

I'm not sure how to test this, or if it needs a test.

Co-authored-by: Nixon Enraght-Moony <nixon.emoony@gmail.com>

Trivial merge