Update bootstrap/helpers/docker.php

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Andras Bacsai 2025-10-15 14:51:36 +02:00 committed by GitHub
parent 41afa9568d
commit ed07e662ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1182,6 +1182,10 @@ function escapeBashDoubleQuoted(?string $value): string
$escaped
);
// Preserve pre-escaped dollars inside double quotes: turn \\$ back into \$
// (keeps tests like "path\\to\\file" intact while restoring \$ semantics)
$escaped = preg_replace('/\\\\(?=\$)/', '\\\\', $escaped);
// Wrap in double quotes
return "\"{$escaped}\"";
}