authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-17 21:33:22-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-02-18 00:59:06-08:00
log4d886b99f5f786ee407d8d38d77c0e9d1c7548da
tree94242deff5b3034c9aeb0caca626343c2c0452d6
parent4e791759cfecaa74319959fe800e0a34c680c442

Fix Windows percent escaping in script env injection

Co-authored-by: codex <codex@users.noreply.github.com>

2 files changed, 2 insertions(+), 2 deletions(-)

apps/web/src/projectScripts.test.ts+1-1
......@@ -40,7 +40,7 @@ describe("projectScripts helpers", () => {
4040 { T3CODE_PROJECT_ROOT: '%USERPROFILE%^"repo"' },
4141 "Win32",
4242 );
43 expect(command).toBe('set "T3CODE_PROJECT_ROOT=%%USERPROFILE%%^^""repo""" && bun install');
43 expect(command).toBe('set "T3CODE_PROJECT_ROOT=^%USERPROFILE^%^^""repo""" && bun install');
4444 });
4545
4646 it("resolves primary and setup scripts", () => {
apps/web/src/projectScripts.ts+1-1
......@@ -57,7 +57,7 @@ function shellEscapePosix(value: string): string {
5757}
5858
5959function shellEscapeWindowsSetValue(value: string): string {
60 return value.replace(/\^/g, "^^").replace(/%/g, "%%").replace(/"/g, '""');
60 return value.replace(/\^/g, "^^").replace(/%/g, "^%").replace(/"/g, '""');
6161}
6262
6363export function injectEnvIntoShellCommand(