Hopefully fail not restore_pkgs.sh with exit code on errors to install_and_cache_pkgs.sh is really run on error.

This commit is contained in:
Torsten Marco Knodt 2025-01-12 16:07:40 +00:00 committed by GitHub
parent e40d1ce99b
commit 17ab10b5ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,9 @@
#!/bin/bash
# Fail on any error.
set -e
set -eET -o pipefail
trap 'exit -1' ERR
# Debug mode for diagnosing issues.
# Setup first before other operations.
@ -50,7 +52,7 @@ for cached_filepath in ${cached_filepaths}; do
sudo tar -xf "${cached_filepath}" -C "${cache_restore_root}" > /dev/null
log " done"
# Execute install scripts if available.
# Execute install scripts if available.
if test ${execute_install_scripts} == "true"; then
# May have to add more handling for extracting pre-install script before extracting all files.
# Keeping it simple for now.