Fix Windows percent escaping in script env injection

Co-authored-by: codex <[email protected]>
This commit is contained in:
Julius Marmingeandcodex committed 2026-02-17 21:33:22 -08:00
1 parent 718a682782
commit 5f94bfd5fe
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ describe("projectScripts helpers", () => {
{ T3CODE_PROJECT_ROOT: '%USERPROFILE%^"repo"' },
"Win32",
);
expect(command).toBe('set "T3CODE_PROJECT_ROOT=%%USERPROFILE%%^^""repo""" && bun install');
expect(command).toBe('set "T3CODE_PROJECT_ROOT=^%USERPROFILE^%^^""repo""" && bun install');
});
it("resolves primary and setup scripts", () => {
+1 -1
View File
@@ -57,7 +57,7 @@ function shellEscapePosix(value: string): string {
}
function shellEscapeWindowsSetValue(value: string): string {
return value.replace(/\^/g, "^^").replace(/%/g, "%%").replace(/"/g, '""');
return value.replace(/\^/g, "^^").replace(/%/g, "^%").replace(/"/g, '""');
}
export function injectEnvIntoShellCommand(