diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2022-03-02 15:16:53 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-02 18:08:05 +0100 |
commit | 9a83d345433412c6bd332f6b931c746f5a59ca91 (patch) | |
tree | 8a51fcab3d860bce9988eaf5083d09b275035366 /Userland/DevTools/HackStudio/TerminalWrapper.h | |
parent | 5d29f64c99865a8f315a9a38e620db7c3dcee535 (diff) | |
download | serenity-9a83d345433412c6bd332f6b931c746f5a59ca91.zip |
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.
Diffstat (limited to 'Userland/DevTools/HackStudio/TerminalWrapper.h')
-rw-r--r-- | Userland/DevTools/HackStudio/TerminalWrapper.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/DevTools/HackStudio/TerminalWrapper.h b/Userland/DevTools/HackStudio/TerminalWrapper.h index d06e213175..128aff05e2 100644 --- a/Userland/DevTools/HackStudio/TerminalWrapper.h +++ b/Userland/DevTools/HackStudio/TerminalWrapper.h @@ -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; } |