Support legacy argument order for package parsing scripts

This commit is contained in:
copilot-swe-agent[bot] 2026-06-13 23:49:32 +00:00 committed by GitHub
parent 0f6145ff6d
commit c1896220a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 8 deletions

View file

@ -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}"

View file

@ -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..."