diff options
| author | Olcan <[email protected]> | 2025-05-21 09:00:54 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-21 09:00:54 -0700 |
| commit | 8a70b98d1dd492c645b828a2e180a66e1c20d5cd (patch) | |
| tree | b400288afd444d930d1b3d4ae878bd5c83bba245 /packages/cli/src/ui/hooks/shellCommandProcessor.ts | |
| parent | c9de822930dff0a4bbd3ee5e13023b54dc0222c3 (diff) | |
fix exit code for shell mode also (#466)
Diffstat (limited to 'packages/cli/src/ui/hooks/shellCommandProcessor.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/shellCommandProcessor.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/shellCommandProcessor.ts b/packages/cli/src/ui/hooks/shellCommandProcessor.ts index 35935e7d..ae8367d6 100644 --- a/packages/cli/src/ui/hooks/shellCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/shellCommandProcessor.ts @@ -43,7 +43,7 @@ export const useShellCommandProcessor = ( const pwdFilePath = path.join(os.tmpdir(), pwdFileName); if (!commandToExecute.endsWith('&')) commandToExecute += ';'; // note here we could also restore a previous pwd with `cd {cwd}; { ... }` - commandToExecute = `{ ${commandToExecute} }; pwd >${pwdFilePath}`; + commandToExecute = `{ ${commandToExecute} }; __code=$?; pwd >${pwdFilePath}; exit $__code`; const userMessageTimestamp = Date.now(); addItemToHistory( |
