fix(core): Improve errors in situations where the command spawn does … (#5723)

This commit is contained in:
Richie Foreman
2025-08-06 19:31:42 -04:00
committed by GitHub
parent 882b54a74a
commit 421d6e14b1
2 changed files with 43 additions and 12 deletions
@@ -185,6 +185,16 @@ describe('ShellExecutionService', () => {
expect(result.error).toBe(spawnError);
expect(result.exitCode).toBe(1);
});
it('handles errors that do not fire the exit event', async () => {
const error = new Error('spawn abc ENOENT');
const { result } = await simulateExecution('touch cat.jpg', (cp) => {
cp.emit('error', error); // No exit event is fired.
});
expect(result.error).toBe(error);
expect(result.exitCode).toBe(1);
});
});
describe('Aborting Commands', () => {