fix: keep backslashes in quoted exec paths

This commit is contained in:
Peter Steinberger
2026-01-22 09:58:15 +00:00
parent ced9efd964
commit e389bd478b

View File

@@ -519,7 +519,7 @@ function splitShellPipeline(command: string): { ok: boolean; reason?: string; se
escaped = false;
continue;
}
if (!inSingle && ch === "\\") {
if (!inSingle && !inDouble && ch === "\\") {
escaped = true;
buf += ch;
continue;
@@ -595,7 +595,7 @@ function tokenizeShellSegment(segment: string): string[] | null {
escaped = false;
continue;
}
if (!inSingle && ch === "\\") {
if (!inSingle && !inDouble && ch === "\\") {
escaped = true;
continue;
}