mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 21:45:29 +00:00
Shell: Run the command's next chain even when it's empty
This commit is contained in:
committed by
Andreas Kling
parent
be94a4ffa6
commit
4981b30ea5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user