1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

Shell: Replace Result<T, E> use with ErrorOr<T>

This commit is contained in:
Andreas Kling 2021-11-07 11:36:11 +01:00
parent 184810a581
commit d1477bcb8e
3 changed files with 11 additions and 12 deletions

View file

@ -603,8 +603,7 @@ RefPtr<Job> Shell::run_command(const AST::Command& command)
auto resolve_redirection = [&](auto& redirection) -> IterationDecision {
auto rewiring_result = redirection.apply();
if (rewiring_result.is_error()) {
if (!rewiring_result.error().is_empty())
warnln("error: {}", rewiring_result.error());
warnln("error: {}", rewiring_result.error());
return IterationDecision::Break;
}
auto& rewiring = rewiring_result.value();