mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 12:11:09 +00:00
fix exit code for shell mode also (#466)
This commit is contained in:
parent
c9de822930
commit
8a70b98d1d
2 changed files with 3 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue