mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 05:21:34 -07:00
Parse FD move operations like 2>&1- correctly. Fixes #1180.
This commit is contained in:
parent
aa3b3fdc56
commit
cf608dc2f6
3 changed files with 11 additions and 1 deletions
|
@ -1401,6 +1401,7 @@ prop_checkSpuriousExec4 = verifyNot checkSpuriousExec "if a; then exec b; fi"
|
|||
prop_checkSpuriousExec5 = verifyNot checkSpuriousExec "exec > file; cmd"
|
||||
prop_checkSpuriousExec6 = verify checkSpuriousExec "exec foo > file; cmd"
|
||||
prop_checkSpuriousExec7 = verifyNot checkSpuriousExec "exec file; echo failed; exit 3"
|
||||
prop_checkSpuriousExec8 = verifyNot checkSpuriousExec "exec {origout}>&1- >tmp.log 2>&1; bar"
|
||||
checkSpuriousExec _ = doLists
|
||||
where
|
||||
doLists (T_Script _ _ cmds) = doList cmds
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue