Skip to content

Commit

Permalink
Hopefully fail not restore_pkgs.sh with exit code on errors to instal…
Browse files Browse the repository at this point in the history
…l_and_cache_pkgs.sh is really run on error.
  • Loading branch information
torsknod2 authored Jan 12, 2025
1 parent e40d1ce commit 17ab10b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions restore_pkgs.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 17ab10b

Please sign in to comment.