fix exit code for shell mode also (#466)

This commit is contained in:
Olcan 2025-05-21 09:00:54 -07:00 committed by GitHub
parent c9de822930
commit 8a70b98d1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -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),
);