mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 14:27:35 +08:00
Use maybe instead of isJust and fromJust
This commit is contained in:
@@ -491,7 +491,7 @@ checkBraceExpansionVars = ForShell [Bash] f
|
||||
toString t = fromJust $ getLiteralStringExt literalExt t
|
||||
isEvaled t = do
|
||||
cmd <- getClosestCommandM t
|
||||
return $ isJust cmd && fromJust cmd `isUnqualifiedCommand` "eval"
|
||||
return $ maybe False (`isUnqualifiedCommand` "eval") cmd
|
||||
|
||||
|
||||
prop_checkMultiDimensionalArrays1 = verify checkMultiDimensionalArrays "foo[a][b]=3"
|
||||
|
Reference in New Issue
Block a user