Skip to content

Commit 3792dcb

Browse files
committed
Fix windowsVerbatimArguments dropped in waited spawn path and remove unused DesktopLauncherError export
- Pass windowsVerbatimArguments from resolveSpawnInput through to ChildProcess.make in spawnPlan, matching the detached path behavior. Previously the flag was computed but discarded, risking double-escaped cmd.exe arguments on Windows waited launches. - Remove unused DesktopLauncherError union schema export from Services/DesktopLauncher.ts (dead code with no imports). - Fix test harness to conditionally include windowsVerbatimArguments only when defined, fixing pre-existing deepEqual assertion failures.
1 parent 1218eff commit 3792dcb

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

apps/server/src/process/Layers/DesktopLauncher.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ function spawnerLayer(
6767
readonly options: {
6868
readonly detached?: boolean;
6969
readonly shell?: boolean | string;
70+
readonly windowsVerbatimArguments?: boolean;
7071
readonly stdin?: unknown;
7172
readonly stdout?: unknown;
7273
readonly stderr?: unknown;
@@ -78,6 +79,9 @@ function spawnerLayer(
7879
args: [...standardCommand.args],
7980
detached: standardCommand.options.detached,
8081
shell: standardCommand.options.shell,
82+
...(standardCommand.options.windowsVerbatimArguments !== undefined
83+
? { windowsVerbatimArguments: standardCommand.options.windowsVerbatimArguments }
84+
: {}),
8185
stdin: standardCommand.options.stdin,
8286
stdout: standardCommand.options.stdout,
8387
stderr: standardCommand.options.stderr,
@@ -153,7 +157,9 @@ function spawnHarness(
153157
args: [...input.args],
154158
detached: input.detached,
155159
shell: input.shell,
156-
windowsVerbatimArguments: input.windowsVerbatimArguments,
160+
...(input.windowsVerbatimArguments !== undefined
161+
? { windowsVerbatimArguments: input.windowsVerbatimArguments }
162+
: {}),
157163
stdin: input.stdin,
158164
stdout: input.stdout,
159165
stderr: input.stderr,

apps/server/src/process/Layers/DesktopLauncher.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,9 @@ export const make = Effect.fn("makeDesktopLauncher")(function* (
749749
ChildProcess.make(input.command, [...input.args], {
750750
detached: plan.detached,
751751
shell: plan.shell,
752+
...(input.windowsVerbatimArguments !== undefined
753+
? { windowsVerbatimArguments: input.windowsVerbatimArguments }
754+
: {}),
752755
...(plan.stdio === "ignore"
753756
? {
754757
stdin: "ignore",

apps/server/src/process/Services/DesktopLauncher.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,6 @@ export class DesktopLauncherLaunchAttemptsExhaustedError extends Schema.TaggedEr
127127
}
128128
}
129129

130-
export const DesktopLauncherError = Schema.Union([
131-
DesktopLauncherCommandNotFoundError,
132-
DesktopLauncherDiscoveryError,
133-
DesktopLauncherLaunchAttemptsExhaustedError,
134-
DesktopLauncherNonZeroExitError,
135-
DesktopLauncherSpawnError,
136-
DesktopLauncherUnknownEditorError,
137-
DesktopLauncherValidationError,
138-
]);
139-
140130
export interface OpenInEditorInput {
141131
readonly cwd: string;
142132
readonly editor: EditorId;

0 commit comments

Comments
 (0)