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 <noreply@anthropic.com>
This commit is contained in:
parent
478e0b8009
commit
52b4ee42d2
1 changed files with 7 additions and 5 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue