From 22cc88d2892b56b8f1ee359bfbdf2634217aae49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dj8yf0=CE=BCl?= Date: Tue, 22 Oct 2024 11:33:02 +0300 Subject: [PATCH] ci: debug info --- cargo-near/src/commands/new/mod.rs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/cargo-near/src/commands/new/mod.rs b/cargo-near/src/commands/new/mod.rs index c0da2f26..c0c06fb4 100644 --- a/cargo-near/src/commands/new/mod.rs +++ b/cargo-near/src/commands/new/mod.rs @@ -96,17 +96,28 @@ impl NewContext { )); } - let status = std::process::Command::new("git") + // let status = std::process::Command::new("git") + let child = std::process::Command::new("git") .arg("commit") .arg("-m") .arg("init") .current_dir(project_dir) - .stdout(Stdio::null()) - .stderr(Stdio::null()) - .status()?; - if !status.success() { + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + // .stdout(Stdio::null()) + // .stderr(Stdio::null()) + // .status()?; + .spawn()?; + // if !status.success() { + // return Err(color_eyre::eyre::eyre!( + // "Failed to execute process: `git commit -m init`" + // )); + // } + let output = child.wait_with_output()?; + if !output.status.success() { + println!("{}", String::from_utf8_lossy(&output.stderr)); return Err(color_eyre::eyre::eyre!( - "Failed to execute process: `git commit -m init`" + "Failed to execute process: `cargo update`" )); }