diff options
-rw-r--r-- | Shell/Parser.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Shell/Parser.cpp b/Shell/Parser.cpp index c6b322755c..fe3f0a65c0 100644 --- a/Shell/Parser.cpp +++ b/Shell/Parser.cpp @@ -883,8 +883,7 @@ RefPtr<AST::Node> Parser::parse_redirection() dest_pipe_fd = -1; } else { auto fd = number.to_int(); - ASSERT(fd.has_value()); - dest_pipe_fd = fd.value(); + dest_pipe_fd = fd.value_or(-1); } auto redir = create<AST::Fd2FdRedirection>(pipe_fd, dest_pipe_fd); // Redirection Fd2Fd if (dest_pipe_fd == -1) |