From 639fa19fa805eb799de7ed27b5a238ee12deff23 Mon Sep 17 00:00:00 2001 From: Nathaniel Landau Date: Wed, 15 Jan 2025 14:18:54 -0500 Subject: [PATCH] fix: harden install-non-pkg-mngr script (#25) --- .../run_after_30_install-non-pkg-mngr-binaries.sh.tmpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/.chezmoiscripts/run_after_30_install-non-pkg-mngr-binaries.sh.tmpl b/dotfiles/.chezmoiscripts/run_after_30_install-non-pkg-mngr-binaries.sh.tmpl index f2c604d..3868969 100644 --- a/dotfiles/.chezmoiscripts/run_after_30_install-non-pkg-mngr-binaries.sh.tmpl +++ b/dotfiles/.chezmoiscripts/run_after_30_install-non-pkg-mngr-binaries.sh.tmpl @@ -53,8 +53,9 @@ if [[ ! -e "${HOME}/bin/install-binary.py" ]]; then _safeExit_ fi - -uv run -q ${HOME}/bin/install-binary.py --binary-name="{{ $binary.name }}" --repository="{{ $binary.repository }}" --version-regex="{{ $binary.version_regex }}" --remove-from-release="{{ $binary.remove_from_release }}" --executable-name="{{ $binary.executable_name }}" --description="{{ $binary.description }}" +if ! uv run -q ${HOME}/bin/install-binary.py --binary-name="{{ $binary.name }}" --repository="{{ $binary.repository }}" --version-regex="{{ $binary.version_regex }}" --remove-from-release="{{ $binary.remove_from_release }}" --executable-name="{{ $binary.executable_name }}" --description="{{ $binary.description }}"; then + error "Could not install {{ $binary.name }}. Review error messages above." +fi {{ end }}