mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2026-08-27 11:24:49 +00:00
Support legacy argument order for package parsing scripts
This commit is contained in:
parent
0f6145ff6d
commit
c1896220a3
|
|
@ -26,10 +26,14 @@ debug="${5}"
|
|||
test "${debug}" = "true" && set -x
|
||||
|
||||
# Repositories to add before installing packages.
|
||||
add_repository="${6}"
|
||||
|
||||
# List of the packages to use.
|
||||
packages="${@:7}"
|
||||
# Keep compatibility with older action versions that only passed 6 args.
|
||||
if [ "$#" -ge 7 ]; then
|
||||
add_repository="${6}"
|
||||
packages="${@:7}"
|
||||
else
|
||||
add_repository=""
|
||||
packages="${@:6}"
|
||||
fi
|
||||
|
||||
if test "${cache_hit}" = "true"; then
|
||||
${script_dir}/restore_pkgs.sh "${cache_dir}" "${cache_restore_root}" "${execute_install_scripts}" "${debug}"
|
||||
|
|
|
|||
|
|
@ -25,10 +25,14 @@ execute_install_scripts="${3}"
|
|||
debug="${4}"
|
||||
|
||||
# Repositories to add before installing packages.
|
||||
add_repository="${5}"
|
||||
|
||||
# List of the packages to use.
|
||||
input_packages="${@:6}"
|
||||
# Keep compatibility with older action versions that only passed 5 args.
|
||||
if [ "$#" -ge 6 ]; then
|
||||
add_repository="${5}"
|
||||
input_packages="${@:6}"
|
||||
else
|
||||
add_repository=""
|
||||
input_packages="${@:5}"
|
||||
fi
|
||||
|
||||
# Trim commas, excess spaces, and sort.
|
||||
log "Normalizing package list..."
|
||||
|
|
|
|||
Loading…
Reference in a new issue