mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-02 12:59:12 +00:00
Fix VSCode cargo-watch functionality on Linux.
As of #1079 the VSCode cargo-watch functionality has been broken on Linux systems. The cause seems to be that linux takes the added quotes inside process arguments literally, so it attempts to make cargo-watch run the command `cargo "check --message-format json"` with the entire quoted part being treated as a single long subcommand, which cargo doesn't know how to handle. Removing the extra quotes solves the issue.
This commit is contained in:
parent
fdbebccd71
commit
4d78c85de2
1 changed files with 1 additions and 2 deletions
|
|
@ -46,12 +46,11 @@ export class CargoWatchProvider {
|
||||||
'Cargo Watch Trace'
|
'Cargo Watch Trace'
|
||||||
);
|
);
|
||||||
|
|
||||||
let args = '"check --message-format json';
|
let args = 'check --message-format json';
|
||||||
if (Server.config.cargoWatchOptions.checkArguments.length > 0) {
|
if (Server.config.cargoWatchOptions.checkArguments.length > 0) {
|
||||||
// Excape the double quote string:
|
// Excape the double quote string:
|
||||||
args += ' ' + Server.config.cargoWatchOptions.checkArguments;
|
args += ' ' + Server.config.cargoWatchOptions.checkArguments;
|
||||||
}
|
}
|
||||||
args += '"';
|
|
||||||
|
|
||||||
// Start the cargo watch with json message
|
// Start the cargo watch with json message
|
||||||
this.cargoProcess = child_process.spawn(
|
this.cargoProcess = child_process.spawn(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue