mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-07 21:41:34 -07:00
Simplify causesSubshell
This commit is contained in:
parent
14ee462ccd
commit
f55d8c45e5
1 changed files with 3 additions and 5 deletions
|
@ -460,11 +460,9 @@ leadType params t =
|
|||
|
||||
causesSubshell = do
|
||||
(T_Pipeline _ _ list) <- parentPipeline
|
||||
if length list <= 1
|
||||
then return False
|
||||
else if not $ hasLastpipe params
|
||||
then return True
|
||||
else return . not $ (getId . head $ reverse list) == getId t
|
||||
return $ case list of
|
||||
_:_:_ -> not (hasLastpipe params) || getId (last list) /= getId t
|
||||
_ -> False
|
||||
|
||||
getModifiedVariables t =
|
||||
case t of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue