Update bootstrap/helpers/docker.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
41afa9568d
commit
ed07e662ea
1 changed files with 4 additions and 0 deletions
|
|
@ -1182,6 +1182,10 @@ function escapeBashDoubleQuoted(?string $value): string
|
||||||
$escaped
|
$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
|
// Wrap in double quotes
|
||||||
return "\"{$escaped}\"";
|
return "\"{$escaped}\"";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue