Skip to content

Commit f15be4c

Browse files
committed
fix: incorrect logic to create release packages with subset AGENTS or SCRIPTS
1 parent e6d6f3c commit f15be4c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/scripts/create-release-packages.sh

100644100755
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,22 +196,22 @@ ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf codex kilo
196196
ALL_SCRIPTS=(sh ps)
197197

198198
norm_list() {
199-
# convert comma+space separated -> space separated unique while preserving order of first occurrence
200-
tr ',\n' ' ' | awk '{for(i=1;i<=NF;i++){if(!seen[$i]++){printf((out?" ":"") $i)}}}END{printf("\n")}'
199+
# convert comma+space separated -> line separated unique while preserving order of first occurrence
200+
tr ',\n' ' ' | awk '{for(i=1;i<=NF;i++){if(!seen[$i]++){printf((out?"\n":"") $i);out=1}}}'
201201
}
202202

203203
validate_subset() {
204204
local type=$1; shift; local -n allowed=$1; shift; local items=("$@")
205-
local ok=1
205+
local invalid=0
206206
for it in "${items[@]}"; do
207207
local found=0
208208
for a in "${allowed[@]}"; do [[ $it == "$a" ]] && { found=1; break; }; done
209209
if [[ $found -eq 0 ]]; then
210210
echo "Error: unknown $type '$it' (allowed: ${allowed[*]})" >&2
211-
ok=0
211+
invalid=1
212212
fi
213213
done
214-
return $ok
214+
return $invalid
215215
}
216216

217217
if [[ -n ${AGENTS:-} ]]; then

0 commit comments

Comments
 (0)