mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Shell: Don't reset 'last_return_code' before running commands
Some variables depend on its value to function correctly. Fixes the following issue: $ false; echo $? 1 $ false $ echo $? 128
This commit is contained in:
parent
689fe7ddff
commit
310a18da1e
Notes:
sideshowbarker
2024-07-17 21:20:49 +09:00
Author: https://github.com/alimpfard
Commit: 310a18da1e
Pull-request: https://github.com/SerenityOS/serenity/pull/11634
4 changed files with 20 additions and 18 deletions
|
@ -212,7 +212,7 @@ public:
|
|||
char hostname[HostNameSize];
|
||||
|
||||
uid_t uid;
|
||||
int last_return_code { 0 };
|
||||
Optional<int> last_return_code;
|
||||
Vector<String> directory_stack;
|
||||
CircularQueue<String, 8> cd_history; // FIXME: have a configurable cd history length
|
||||
HashMap<u64, NonnullRefPtr<Job>> jobs;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue