mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-25 19:02:07 -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 the command is empty, store the redirections and apply them to all later commands.
|
||||||
if (command.argv.is_empty() && !command.should_immediately_execute_next) {
|
if (command.argv.is_empty() && !command.should_immediately_execute_next) {
|
||||||
m_global_redirections.append(command.redirections);
|
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;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue