From 4ed67f377443266ff7e0fb53680bb8fd5bebbd2e Mon Sep 17 00:00:00 2001 From: Max Fierke Date: Mon, 14 Oct 2024 22:14:01 -0500 Subject: [PATCH] Configure git via mstrap strap.sh no longer configures git, so we'll do it ourselves --- src/mstrap/steps/dependencies_step.cr | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/mstrap/steps/dependencies_step.cr b/src/mstrap/steps/dependencies_step.cr index 7026290..a3d9f9c 100644 --- a/src/mstrap/steps/dependencies_step.cr +++ b/src/mstrap/steps/dependencies_step.cr @@ -18,16 +18,19 @@ module MStrap def bootstrap install_mise if runtime_managers.any? { |rm| rm.name == "mise" } install_rustup if runtime_managers.any? { |rm| rm.name == "rustup" } - set_strap_env! + set_git_user! strap_sh load_profile! brew_bundle end - private def set_strap_env! - ENV["STRAP_GIT_NAME"] = user.name - ENV["STRAP_GIT_EMAIL"] = user.email - ENV["STRAP_GITHUB_USER"] = user.github + private def set_git_user! + log "==> Setting git user details: " + unless cmd("git", "config", "--global", "user.name", user.name, quiet: true) && cmd("git", "config", "--global", "user.email", user.email, quiet: true) + logc "Unable to set git user details. Is git installed?" + end + + success "OK" end private def strap_sh