Skip to content

Commit

Permalink
added "--teach-me" to execute_git_commands()
Browse files Browse the repository at this point in the history
  • Loading branch information
FroVolod committed Sep 23, 2024
1 parent 195e69c commit 33a03cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cargo-near/src/commands/new/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ fn track_request() {
.unwrap();
}

#[tracing::instrument(name = "The process of executing `git` commands ...", skip_all)]
#[tracing::instrument(name = "The process of executing", skip_all)]
fn execute_git_commands(project_dir: &std::path::Path) -> near_cli_rs::CliResult {
tracing::Span::current().pb_set_message("`git` commands ...");
tracing::info!(target: "near_teach_me", "`git init`");
let status = std::process::Command::new("git")
.arg("init")
.current_dir(project_dir)
Expand All @@ -96,6 +98,7 @@ fn execute_git_commands(project_dir: &std::path::Path) -> near_cli_rs::CliResult
));
}

tracing::info!(target: "near_teach_me", "`cargo update`");
let child = std::process::Command::new("cargo")
.arg("update")
.current_dir(project_dir)
Expand All @@ -110,6 +113,7 @@ fn execute_git_commands(project_dir: &std::path::Path) -> near_cli_rs::CliResult
));
}

tracing::info!(target: "near_teach_me", "`git add -A`");
let status = std::process::Command::new("git")
.arg("add")
.arg("-A")
Expand All @@ -123,6 +127,7 @@ fn execute_git_commands(project_dir: &std::path::Path) -> near_cli_rs::CliResult
));
}

tracing::info!(target: "near_teach_me", "`git commit -m init`");
let status = std::process::Command::new("git")
.arg("commit")
.arg("-m")
Expand Down

0 comments on commit 33a03cd

Please sign in to comment.