From 7c5353272f39759d1ab8ee4415a0d22120da6ae0 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Mon, 5 Dec 2022 07:24:57 +0000 Subject: [PATCH] Update .local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl --- .../run_onchange_after_15_install-asdf-packages.tmpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl b/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl index 7c859c99..b2b0e1c2 100644 --- a/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl +++ b/.local/share/chezmoi/home/.chezmoiscripts/universal/run_onchange_after_15_install-asdf-packages.tmpl @@ -10,11 +10,14 @@ if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then logg info 'Sourcing asdf.sh' . ${ASDF_DIR}/asdf.sh cat .tool-versions | while read TOOL; do - logg info 'Installing ASDF plugin `'"$TOOL"'`' + logg info 'Installing ASDF plugin `'"$(echo "$TOOL" | sed 's/ .*//')"'`' asdf plugin add "$(echo "$TOOL" | sed 's/ .*//')" done logg info 'Installing ASDF dependencies derived from `~/.tool-versions` via `asdf install`' - asdf install || true + asdf install || EXIT_CODE=$? + if [ -n "$EXIT_CODE" ]; then + logg error 'Error installing the ASDF plugins specified in `~/.tool-versions`' + fi else logg warn 'The `$ASDF_DIR/asdf.sh` or `~/.tool-versions` file is not present' fi