Compare commits

...
Author SHA1 Message Date
Cursor Agent 3792dcb889 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.
2026-03-31 23:38:37 +00:00
3 changed files with 10 additions and 11 deletions

No files matched your search

@@ -67,6 +67,7 @@ function spawnerLayer(
readonly options: {
readonly detached?: boolean;
readonly shell?: boolean | string;
readonly windowsVerbatimArguments?: boolean;
readonly stdin?: unknown;
readonly stdout?: unknown;
readonly stderr?: unknown;
@@ -78,6 +79,9 @@ function spawnerLayer(
args: [...standardCommand.args],
detached: standardCommand.options.detached,
shell: standardCommand.options.shell,
...(standardCommand.options.windowsVerbatimArguments !== undefined
? { windowsVerbatimArguments: standardCommand.options.windowsVerbatimArguments }
: {}),
stdin: standardCommand.options.stdin,
stdout: standardCommand.options.stdout,
stderr: standardCommand.options.stderr,
@@ -153,7 +157,9 @@ function spawnHarness(
args: [...input.args],
detached: input.detached,
shell: input.shell,
windowsVerbatimArguments: input.windowsVerbatimArguments,
...(input.windowsVerbatimArguments !== undefined
? { windowsVerbatimArguments: input.windowsVerbatimArguments }
: {}),
stdin: input.stdin,
stdout: input.stdout,
stderr: input.stderr,
@@ -749,6 +749,9 @@ export const make = Effect.fn("makeDesktopLauncher")(function* (
ChildProcess.make(input.command, [...input.args], {
detached: plan.detached,
shell: plan.shell,
...(input.windowsVerbatimArguments !== undefined
? { windowsVerbatimArguments: input.windowsVerbatimArguments }
: {}),
...(plan.stdio === "ignore"
? {
stdin: "ignore",
@@ -127,16 +127,6 @@ export class DesktopLauncherLaunchAttemptsExhaustedError extends Schema.TaggedEr
}
}
export const DesktopLauncherError = Schema.Union([
DesktopLauncherCommandNotFoundError,
DesktopLauncherDiscoveryError,
DesktopLauncherLaunchAttemptsExhaustedError,
DesktopLauncherNonZeroExitError,
DesktopLauncherSpawnError,
DesktopLauncherUnknownEditorError,
DesktopLauncherValidationError,
]);
export interface OpenInEditorInput {
readonly cwd: string;
readonly editor: EditorId;