Skip to content

Commit

Permalink
Fix windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed May 13, 2020
1 parent 62711bd commit 5a096da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/cargo/core/shell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ impl Shell {
}
#[cfg(windows)]
{
if let ShellOut::Stream { stream, .. } = &mut self.err {
::fwdansi::write_ansi(stream, message)?;
if let ShellOut::Stream { stderr, .. } = &mut self.output {
::fwdansi::write_ansi(stderr, message)?;
return Ok(());
}
}
Expand Down Expand Up @@ -495,6 +495,6 @@ mod imp {
fn default_err_erase_line(shell: &mut Shell) {
if let Some(max_width) = imp::stderr_width() {
let blank = " ".repeat(max_width);
drop(write!(shell.err.as_write(), "{}\r", blank));
drop(write!(shell.output.stderr(), "{}\r", blank));
}
}
2 changes: 1 addition & 1 deletion src/cargo/ops/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
use std::collections::{BTreeSet, HashMap, HashSet};
use std::env;
use std::ffi::OsString;
use std::io::Write;
use std::path::{Path, PathBuf};
use std::process::{self, Command, ExitStatus};
use std::str;
Expand Down Expand Up @@ -525,6 +524,7 @@ fn rustfix_and_fix(
fn exit_with(status: ExitStatus) -> ! {
#[cfg(unix)]
{
use std::io::Write;
use std::os::unix::prelude::*;
if let Some(signal) = status.signal() {
drop(writeln!(
Expand Down

0 comments on commit 5a096da

Please sign in to comment.