From 8a70b98d1dd492c645b828a2e180a66e1c20d5cd Mon Sep 17 00:00:00 2001 From: Olcan Date: Wed, 21 May 2025 09:00:54 -0700 Subject: fix exit code for shell mode also (#466) --- packages/cli/src/ui/hooks/shellCommandProcessor.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/cli/src/ui/hooks/shellCommandProcessor.test.ts') diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.test.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.test.ts index 6d7ea5d6..3645cc80 100644 --- a/packages/cli/src/ui/hooks/shellCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/shellCommandProcessor.test.ts @@ -155,7 +155,7 @@ describe('useShellCommandProcessor', () => { expect.stringContaining('Executing shell command in /current/dir:'), ); expect(mockExecuteCommand).toHaveBeenCalledWith( - '{ !ls -l; }; pwd >/tmp/shell_pwd_randomBytes.tmp', + '{ !ls -l; }; __code=$?; pwd >/tmp/shell_pwd_randomBytes.tmp; exit $__code', { cwd: '/current/dir' }, expect.any(Function), ); @@ -272,7 +272,7 @@ describe('useShellCommandProcessor', () => { expect.any(Number), ); expect(mockExecuteCommand).toHaveBeenCalledWith( - '{ !sleep 5 & }; pwd >/tmp/shell_pwd_randomBytes.tmp', + '{ !sleep 5 & }; __code=$?; pwd >/tmp/shell_pwd_randomBytes.tmp; exit $__code', { cwd: '/current/dir' }, expect.any(Function), ); -- cgit v1.2.3