diff --git a/VERSION b/VERSION index 6871b9e..6ee33ba 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.44 +0.1.45 diff --git a/formula/ih-core.rb b/formula/ih-core.rb index ca8eba2..d9a421a 100644 --- a/formula/ih-core.rb +++ b/formula/ih-core.rb @@ -1,5 +1,5 @@ class IhCore < Formula - VERSION="0.1.44" + VERSION="0.1.45" desc "Brew formula for installing core tools used at Included Health engineering." homepage "https://github.com/ConsultingMD/homebrew-ih-public" license "CC BY-NC-ND 4.0" diff --git a/lib/core/asdf/step.sh b/lib/core/asdf/step.sh index e46f1a1..f908b4d 100644 --- a/lib/core/asdf/step.sh +++ b/lib/core/asdf/step.sh @@ -55,6 +55,27 @@ function ih::setup::core.asdf::deps() { echo "core.shell core.git" } +function recreate_shims() { + ih::log::info "Removing existing asdf shims..." + if [ -d "$HOME/.asdf/shims" ]; then + rm -f "$HOME/.asdf/shims"/* + else + ih::log::debug "Shims directory not found." + return 1 + fi + + ih::log::info "Generating new asdf shims..." + asdf reshim + + local EXIT_CODE=$? + if [ $EXIT_CODE -ne 0 ]; then + ih::log::error "Failed to recreate asdf shims." + return $EXIT_CODE + fi + + ih::log::info "Successfully recreated asdf shims." +} + function ih::setup::core.asdf::install() { if ! command -v asdf; then @@ -96,6 +117,8 @@ function ih::setup::core.asdf::install() { fi done <<<"$DESIRED_PLUGINS" + recreate_shims + ih::log::info "Copying augment file for shell" cp -f "$ASDF_SH_TEMPLATE_PATH" "$ASDF_SH_PATH"