add basic busybox sh support

This commit is contained in:
Grische 2023-11-25 12:44:46 +01:00
parent a71a13c2fc
commit be8e4b2b8a
7 changed files with 16 additions and 12 deletions

View file

@ -3349,8 +3349,8 @@ readScriptFile sourced = do
verifyShebang pos s = do
case isValidShell s of
Just True -> return ()
Just False -> parseProblemAt pos ErrorC 1071 "ShellCheck only supports sh/bash/dash/ksh scripts. Sorry!"
Nothing -> parseProblemAt pos ErrorC 1008 "This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify."
Just False -> parseProblemAt pos ErrorC 1071 "ShellCheck only supports sh/bash/dash/ksh/'busybox sh' scripts. Sorry!"
Nothing -> parseProblemAt pos ErrorC 1008 "This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh/'busybox sh'. Add a 'shell' directive to specify."
isValidShell s =
let good = null s || any (`isPrefixOf` s) goodShells
@ -3366,6 +3366,7 @@ readScriptFile sourced = do
"sh",
"ash",
"dash",
"busybox sh",
"bash",
"bats",
"ksh"