From 758508dffb49fda03efc14dc8d5d155c359ed84c Mon Sep 17 00:00:00 2001 From: Rafal Chlodnicki Date: Mon, 19 Oct 2026 22:03:46 +0200 Subject: [PATCH] Allow slashes in extra-packages refs The greedy user and package groups matched up to the last slash, so `sublimelsp/LSP@feat/foo` was parsed as the repository foo of the user `sublimelsp/LSP@feat`. Stop them at the first slash and colon, so that the ref is everything after the first @. --- actions/setup/action.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/actions/setup/action.yaml b/actions/setup/action.yaml index b41783f9..9df428c7 100644 --- a/actions/setup/action.yaml +++ b/actions/setup/action.yaml @@ -219,12 +219,13 @@ runs: # Install extra packages to to Packages/ PC_PACKAGES="" while read -r x; do - if [[ "$x" =~ ^(.*):(.*)/([^@]*)@?(.*)$ ]]; then + # The ref is everything after the first `@`, so that it can contain `/`, e.g. `feat/foo`. + if [[ "$x" =~ ^([^:/]+):([^/]+)/([^@]+)@?(.*)$ ]]; then PKG="${BASH_REMATCH[1]}" USER="${BASH_REMATCH[2]}" REPO="${BASH_REMATCH[3]}" SHA="${BASH_REMATCH[4]}" - elif [[ "$x" =~ ^(.*)/([^@]*)@?(.*)$ ]]; then + elif [[ "$x" =~ ^([^/]+)/([^@]+)@?(.*)$ ]]; then PKG="${BASH_REMATCH[2]}" USER="${BASH_REMATCH[1]}" REPO="${BASH_REMATCH[2]}"