Fix Windows percent escaping in script env injection
Co-authored-by: codex <[email protected]>
This commit is contained in:
1 parent
718a682782
commit
5f94bfd5fe
2 files changed
+2
-2
No files matched your search
@@ -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", () => {
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user