Skip to content

Commit

Permalink
Shell: Fix outdated debug log code
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpfard authored and awesomekling committed Aug 19, 2020
1 parent 6d4016d commit 20d4287
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Shell/Shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,13 +646,14 @@ NonnullRefPtrVector<Job> Shell::run_commands(Vector<AST::Command>& commands)
for (auto& arg : command.argv)
dbg() << "argv: " << arg;
for (auto& redir : command.redirections) {
if (redir->is_path_redirection()) {
auto path_redir = (const AST::PathRedirection*)redir.ptr();
if (redir.is_path_redirection()) {
auto path_redir = (const AST::PathRedirection*)&redir;
dbg() << "redir path " << (int)path_redir->direction << " " << path_redir->path << " <-> " << path_redir->fd;
} else if (redir->is_fd_redirection()) {
dbg() << "redir fd " << redir->source_fd << " -> " << redir->dest_fd;
} else if (redir->is_close_redirection()) {
auto close_redir = (const AST::CloseRedirection*)redir.ptr();
} else if (redir.is_fd_redirection()) {
auto* fdredir = (const AST::FdRedirection*)&redir;
dbg() << "redir fd " << fdredir->source_fd << " -> " << fdredir->dest_fd;
} else if (redir.is_close_redirection()) {
auto close_redir = (const AST::CloseRedirection*)&redir;
dbg() << "close fd " << close_redir->fd;
} else {
ASSERT_NOT_REACHED();
Expand Down

0 comments on commit 20d4287

Please sign in to comment.