mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
Using error
instead of output.stderr
in failure mode.
This commit is contained in:
parent
ca9718aa42
commit
84cf6ad091
@ -2,7 +2,7 @@
|
||||
//! another compatible command (f.x. clippy) in a background thread and provide
|
||||
//! LSP diagnostics based on the output of the command.
|
||||
|
||||
use std::{fmt, io, process::Command, time::Duration, str::from_utf8};
|
||||
use std::{fmt, io, process::Command, time::Duration};
|
||||
|
||||
use crossbeam_channel::{never, select, unbounded, Receiver, Sender};
|
||||
use paths::AbsPathBuf;
|
||||
@ -330,7 +330,7 @@ impl CargoActor {
|
||||
Ok(output) => {
|
||||
Err(io::Error::new(io::ErrorKind::Other, format!(
|
||||
"Cargo watcher failed, the command produced no valid metadata (exit code: {:?})\nCargo's stderr output:\n{}",
|
||||
output.status, from_utf8(&output.stderr).unwrap_or("(Error: Could not fetch Cargo's stderr output)")
|
||||
output.status, error
|
||||
)))
|
||||
}
|
||||
Err(e) => Err(io::Error::new(e.kind(), format!("{:?}: {}", e, error))),
|
||||
|
Loading…
Reference in New Issue
Block a user