mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-08 08:01:12 +08:00
add support for /bin/busybox sh
shebang
This commit is contained in:
@@ -590,6 +590,12 @@ prop_checkShebang9 = verifyNotTree checkShebang "# shellcheck shell=sh\ntrue"
|
||||
prop_checkShebang10= verifyNotTree checkShebang "#!foo\n# shellcheck shell=sh ignore=SC2239\ntrue"
|
||||
prop_checkShebang11= verifyTree checkShebang "#!/bin/sh/\ntrue"
|
||||
prop_checkShebang12= verifyTree checkShebang "#!/bin/sh/ -xe\ntrue"
|
||||
prop_checkShebang13= verifyTree checkShebang "#!/bin/busybox sh"
|
||||
prop_checkShebang14= verifyTree checkShebang "#!/bin/busybox sh\n# shellcheck shell=sh\n"
|
||||
prop_checkShebang15= verifyNotTree checkShebang "#!/bin/busybox sh\n# shellcheck shell=dash\n"
|
||||
prop_checkShebang16= verifyTree checkShebang "#!/bin/busybox ash"
|
||||
prop_checkShebang17= verifyNotTree checkShebang "#!/bin/busybox ash\n# shellcheck shell=dash\n"
|
||||
prop_checkShebang18= verifyNotTree checkShebang "#!/bin/busybox ash\n# shellcheck shell=sh\n"
|
||||
checkShebang params (T_Annotation _ list t) =
|
||||
if any isOverride list then [] else checkShebang params t
|
||||
where
|
||||
|
@@ -3238,7 +3238,9 @@ readScriptFile sourced = do
|
||||
(first:second:_) ->
|
||||
if basename first == "env"
|
||||
then second
|
||||
else basename first
|
||||
else if basename first == "busybox"
|
||||
then second
|
||||
else basename first
|
||||
|
||||
verifyShebang pos s = do
|
||||
case isValidShell s of
|
||||
|
Reference in New Issue
Block a user