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
a74e74c81b
commit
8f66284a52
1 changed files with 7 additions and 5 deletions
|
|
@ -29,13 +29,15 @@ jobs:
|
||||||
- name: Checkout path dependencies
|
- name: Checkout path dependencies
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
for path in $(php -r "
|
php -r '
|
||||||
\$d = json_decode(file_get_contents('composer.json'), true);
|
$d = json_decode(file_get_contents("composer.json"), true);
|
||||||
foreach (\$d['repositories'] ?? [] as \$r) {
|
foreach ($d["repositories"] ?? [] as $r) {
|
||||||
if ((\$r['type'] ?? '') === 'path') echo \$r['url'] . \"\\n\";
|
if (($r["type"] ?? "") === "path") echo $r["url"] . "\n";
|
||||||
}
|
}
|
||||||
"); do
|
' | while IFS= read -r path; do
|
||||||
|
[ -z "$path" ] && continue
|
||||||
dir_name=$(basename "$path")
|
dir_name=$(basename "$path")
|
||||||
if [ ! -d "$path" ]; then
|
if [ ! -d "$path" ]; then
|
||||||
echo "Cloning $dir_name into $path"
|
echo "Cloning $dir_name into $path"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue