diff --git a/src/main/utils/shell-env/compute-unix-shell-environment.injectable.ts b/src/main/utils/shell-env/compute-unix-shell-environment.injectable.ts index d3a72ba1b1..c549817ae2 100644 --- a/src/main/utils/shell-env/compute-unix-shell-environment.injectable.ts +++ b/src/main/utils/shell-env/compute-unix-shell-environment.injectable.ts @@ -133,7 +133,7 @@ const computeUnixShellEnvironmentInjectable = getInjectable({ } else { resolve({ callWasSuccessful: false, - error: `Failed to spawn ${shellPath}: ${getErrorContext({ error })}`, + error: `Failed to spawn ${shellPath}: ${getErrorContext({ error: String(error) })}`, }); } }); diff --git a/src/main/utils/shell-env/compute-unix-shell-environment.test.ts b/src/main/utils/shell-env/compute-unix-shell-environment.test.ts index 2de7204ae8..59a899da37 100644 --- a/src/main/utils/shell-env/compute-unix-shell-environment.test.ts +++ b/src/main/utils/shell-env/compute-unix-shell-environment.test.ts @@ -127,7 +127,11 @@ describe("computeUnixShellEnvironment technical tests", () => { it("should resolve with a failed call", async () => { await expect(unixShellEnv).resolves.toEqual({ callWasSuccessful: false, - error: `Failed to spawn ${shellPath}: Error: some-error`, + error: `Failed to spawn ${shellPath}: ${JSON.stringify({ + error: "Error: some-error", + stdout: "", + stderr: "", + }, null, 4)}`, }); }); }); @@ -229,7 +233,11 @@ describe("computeUnixShellEnvironment technical tests", () => { it("should resolve with a failed call", async () => { await expect(unixShellEnv).resolves.toEqual({ callWasSuccessful: false, - error: `Failed to spawn ${shellPath}: Error: some-error`, + error: `Failed to spawn ${shellPath}: ${JSON.stringify({ + error: "Error: some-error", + stdout: "", + stderr: "", + }, null, 4)}`, }); }); }); @@ -330,7 +338,11 @@ describe("computeUnixShellEnvironment technical tests", () => { it("should resolve with a failed call", async () => { await expect(unixShellEnv).resolves.toEqual({ callWasSuccessful: false, - error: `Failed to spawn ${shellPath}: Error: some-error`, + error: `Failed to spawn ${shellPath}: ${JSON.stringify({ + error: "Error: some-error", + stdout: "", + stderr: "", + }, null, 4)}`, }); }); }); @@ -430,7 +442,11 @@ describe("computeUnixShellEnvironment technical tests", () => { it("should resolve with a failed call", async () => { await expect(unixShellEnv).resolves.toEqual({ callWasSuccessful: false, - error: `Failed to spawn ${shellPath}: Error: some-error`, + error: `Failed to spawn ${shellPath}: ${JSON.stringify({ + error: "Error: some-error", + stdout: "", + stderr: "", + }, null, 4)}`, }); }); });