mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:07:45 +00:00
HackStudio: Propagate error from TerminalWrapper
Use the ErrorOr pattern with the Core::System wrappers to propagate more errors from the TerminalWrapper. The run_command method, when called with WaitForExit::Yes now returns an error on command failure.
This commit is contained in:
parent
5d29f64c99
commit
9a83d34543
4 changed files with 67 additions and 90 deletions
|
@ -21,8 +21,8 @@ public:
|
|||
No,
|
||||
Yes
|
||||
};
|
||||
void run_command(const String&, Optional<String> working_directory = {}, WaitForExit = WaitForExit::No);
|
||||
void kill_running_command();
|
||||
ErrorOr<void> run_command(const String&, Optional<String> working_directory = {}, WaitForExit = WaitForExit::No, Optional<StringView> failure_message = {});
|
||||
ErrorOr<void> kill_running_command();
|
||||
void clear_including_history();
|
||||
|
||||
bool user_spawned() const { return m_user_spawned; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue