mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-28 00:07:03 +08:00
Use null instead of comparing with empty lists
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user