fix: keep backslashes in quoted exec paths
This commit is contained in:
@@ -519,7 +519,7 @@ function splitShellPipeline(command: string): { ok: boolean; reason?: string; se
|
|||||||
escaped = false;
|
escaped = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!inSingle && ch === "\\") {
|
if (!inSingle && !inDouble && ch === "\\") {
|
||||||
escaped = true;
|
escaped = true;
|
||||||
buf += ch;
|
buf += ch;
|
||||||
continue;
|
continue;
|
||||||
@@ -595,7 +595,7 @@ function tokenizeShellSegment(segment: string): string[] | null {
|
|||||||
escaped = false;
|
escaped = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!inSingle && ch === "\\") {
|
if (!inSingle && !inDouble && ch === "\\") {
|
||||||
escaped = true;
|
escaped = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user