fix(expansion/redirection): prevent infinite loop of redir list pointing to itself

also add a hard limit of OVER 9000! iterations for the problematic loop
This commit is contained in:
Khaïs COLIN 2025-04-22 11:50:57 +02:00
parent bf26afce2b
commit aca85c3583
2 changed files with 13 additions and 2 deletions

View file

@ -920,4 +920,12 @@ parsed command
╰─ here_doc_eof = [(null)]
EOF
when_run <<EOF "correctly handle multiple redirections"
echo hello > outfile > outfile
cat outfile
EOF
expecting <<EOF
hello
EOF
finalize