mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2025-03-04 04:09:39 +00:00
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:
parent
e40d1ce99b
commit
17ab10b5ac
|
@ -1,7 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Fail on any error.
|
# Fail on any error.
|
||||||
set -e
|
set -eET -o pipefail
|
||||||
|
|
||||||
|
trap 'exit -1' ERR
|
||||||
|
|
||||||
# Debug mode for diagnosing issues.
|
# Debug mode for diagnosing issues.
|
||||||
# Setup first before other operations.
|
# 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
|
sudo tar -xf "${cached_filepath}" -C "${cache_restore_root}" > /dev/null
|
||||||
log " done"
|
log " done"
|
||||||
|
|
||||||
# Execute install scripts if available.
|
# Execute install scripts if available.
|
||||||
if test ${execute_install_scripts} == "true"; then
|
if test ${execute_install_scripts} == "true"; then
|
||||||
# May have to add more handling for extracting pre-install script before extracting all files.
|
# May have to add more handling for extracting pre-install script before extracting all files.
|
||||||
# Keeping it simple for now.
|
# Keeping it simple for now.
|
||||||
|
|
Loading…
Reference in a new issue