From 52b4ee42d20ed6dcae3842486397de9909e823ef Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Feb 2026 05:24:29 +0000 Subject: [PATCH] fix(ci): use single-quoted PHP to avoid shell escaping issues Switch php -r argument to single quotes so PHP dollar signs are not interpreted by bash. Pipe output to while-read loop. Co-Authored-By: Claude Opus 4.6 --- .forgejo/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index fb74cf6..588ae65 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -29,13 +29,15 @@ jobs: - name: Checkout path dependencies env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: bash run: | - for path in $(php -r " - \$d = json_decode(file_get_contents('composer.json'), true); - foreach (\$d['repositories'] ?? [] as \$r) { - if ((\$r['type'] ?? '') === 'path') echo \$r['url'] . \"\\n\"; + php -r ' + $d = json_decode(file_get_contents("composer.json"), true); + foreach ($d["repositories"] ?? [] as $r) { + if (($r["type"] ?? "") === "path") echo $r["url"] . "\n"; } - "); do + ' | while IFS= read -r path; do + [ -z "$path" ] && continue dir_name=$(basename "$path") if [ ! -d "$path" ]; then echo "Cloning $dir_name into $path"