Skip to content

Commit 2af1c0e

Browse files
committed
Verbose print build_helper stdout
1 parent fb95f00 commit 2af1c0e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/build_helper/src/git.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ pub fn output_result(cmd: &mut Command) -> Result<String, String> {
1616
Err(e) => return Err(format!("failed to run command: {:?}: {}", cmd, e)),
1717
};
1818
if !output.status.success() {
19+
eprintln!("[DEBUG] stdout:\n{}\n\n", String::from_utf8(output.stdout.clone()).unwrap());
20+
eprintln!("[DEBUG] stderr:\n{}\n\n", String::from_utf8(output.stderr.clone()).unwrap());
21+
1922
return Err(format!(
2023
"command did not execute successfully: {:?}\n\
2124
expected success, got: {}\n{}",
@@ -107,8 +110,10 @@ fn git_upstream_merge_base(
107110
git_dir: Option<&Path>,
108111
) -> Result<String, String> {
109112
let updated_master = updated_master_branch(config, git_dir)?;
113+
eprintln!("updated_master = {:?}", updated_master);
110114
let mut git = Command::new("git");
111115
if let Some(git_dir) = git_dir {
116+
eprintln!("git_dir = {:?}", git_dir);
112117
git.current_dir(git_dir);
113118
}
114119
Ok(output_result(git.arg("merge-base").arg(&updated_master).arg("HEAD"))?.trim().to_owned())

0 commit comments

Comments
 (0)