Skip to content

Commit

Permalink
Configure git via mstrap
Browse files Browse the repository at this point in the history
strap.sh no longer configures git, so we'll do it ourselves
  • Loading branch information
maxfierke committed Oct 15, 2024
1 parent 0e79bb5 commit 4ed67f3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/mstrap/steps/dependencies_step.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ed67f3

Please sign in to comment.