Skip to content

Commit

Permalink
ci: debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Oct 22, 2024
1 parent 6024e8d commit 22cc88d
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions cargo-near/src/commands/new/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`"
));
}

Expand Down

0 comments on commit 22cc88d

Please sign in to comment.