Update supported ulimit flags for dash
Values are retrieved from https://linux.die.net/man/1/dash, search for ulimit. Fixes #1406
This commit is contained in:
parent
08ca1ee6e9
commit
bd04af0769
|
@ -136,6 +136,8 @@ prop_checkBashisms53= verifyNot checkBashisms "#!/bin/sh\nprintf -- -f\n"
|
||||||
prop_checkBashisms54= verify checkBashisms "#!/bin/sh\nfoo+=bar"
|
prop_checkBashisms54= verify checkBashisms "#!/bin/sh\nfoo+=bar"
|
||||||
prop_checkBashisms55= verify checkBashisms "#!/bin/sh\necho ${@%foo}"
|
prop_checkBashisms55= verify checkBashisms "#!/bin/sh\necho ${@%foo}"
|
||||||
prop_checkBashisms56= verifyNot checkBashisms "#!/bin/sh\necho ${##}"
|
prop_checkBashisms56= verifyNot checkBashisms "#!/bin/sh\necho ${##}"
|
||||||
|
prop_checkBashisms57= verifyNot checkBashisms "#!/bin/dash\nulimit -c 0"
|
||||||
|
prop_checkBashisms58= verify checkBashisms "#!/bin/sh\nulimit -c 0"
|
||||||
checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
||||||
params <- ask
|
params <- ask
|
||||||
kludge params t
|
kludge params t
|
||||||
|
@ -283,7 +285,7 @@ checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
||||||
("export", ["-p"]),
|
("export", ["-p"]),
|
||||||
("printf", []),
|
("printf", []),
|
||||||
("read", if isDash then ["r", "p"] else ["r"]),
|
("read", if isDash then ["r", "p"] else ["r"]),
|
||||||
("ulimit", ["f"])
|
("ulimit", if isDash then ["H", "S", "t", "f", "d", "s", "c", "m", "l", "p", "n"] else ["f"])
|
||||||
]
|
]
|
||||||
bashism t@(T_SourceCommand id src _) =
|
bashism t@(T_SourceCommand id src _) =
|
||||||
let name = fromMaybe "" $ getCommandName src
|
let name = fromMaybe "" $ getCommandName src
|
||||||
|
|
Loading…
Reference in New Issue