Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix blocked stdout #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1584,14 +1584,16 @@ fn cargo_target_by_message(input: &Input, manifest: &str, use_bincache: bool, me
trace!(".. cmd: {:?}", cmd);

let mut child = try!(cmd.spawn());
let mut stdout = Vec::new();
try!(child.stdout.take().unwrap().read_to_end(&mut stdout));
match try!(child.wait()).code() {
Some(0) => (),
Some(st) => return Err(format!("could not determine target filename: cargo exited with status {}", st).into()),
None => return Err(format!("could not determine target filename: cargo exited abnormally").into()),
}

let mut line = String::with_capacity(1024);
let mut stdout = BufReader::new(child.stdout.take().unwrap());
let mut stdout = BufReader::new(std::io::Cursor::new(stdout));
let null = json::Json::Null;
let package_name = input.package_name();

Expand Down