Use null instead of comparing with empty lists

This commit is contained in:
Joseph C. Sible 2020-02-01 22:50:21 -05:00
parent e6e89d68fd
commit c29b6afa56
5 changed files with 14 additions and 14 deletions

View file

@ -3169,7 +3169,7 @@ readScriptFile sourced = do
Nothing -> parseProblemAt pos ErrorC 1008 "This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify."
isValidShell s =
let good = s == "" || any (`isPrefixOf` s) goodShells
let good = null s || any (`isPrefixOf` s) goodShells
bad = any (`isPrefixOf` s) badShells
in
if good