From fa841cb2701863b84ace7d652ff977db315e599c Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Sun, 5 Apr 2020 20:08:02 -0400 Subject: [PATCH] Prefer pattern matching in undirected --- src/ShellCheck/Checks/Commands.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShellCheck/Checks/Commands.hs b/src/ShellCheck/Checks/Commands.hs index 9e19ab5..19884ee 100644 --- a/src/ShellCheck/Checks/Commands.hs +++ b/src/ShellCheck/Checks/Commands.hs @@ -519,9 +519,9 @@ checkInteractiveSu = CommandCheck (Basename "su") f info (getId cmd) 2117 "To run commands as another user, use su -c or sudo." - undirected (T_Pipeline _ _ l) = length l <= 1 + undirected (T_Pipeline _ _ (_:_:_)) = False -- This should really just be modifications to stdin, but meh - undirected (T_Redirecting _ list _) = null list + undirected (T_Redirecting _ (_:_) _) = False undirected _ = True