mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 10:22:05 -05:00
Shell: Run the command's next chain even when it's empty
This commit is contained in:
parent
be94a4ffa6
commit
4981b30ea5
1 changed files with 2 additions and 0 deletions
|
@ -614,6 +614,8 @@ RefPtr<Job> Shell::run_command(const AST::Command& command)
|
|||
// If the command is empty, store the redirections and apply them to all later commands.
|
||||
if (command.argv.is_empty() && !command.should_immediately_execute_next) {
|
||||
m_global_redirections.append(command.redirections);
|
||||
for (auto& next_in_chain : command.next_chain)
|
||||
run_tail(command, next_in_chain, last_return_code);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue