Merge pull request #1460 from contivero/umask-flags
Check umask flags under dash & POSIX sh (fixes #1459)
This commit is contained in:
commit
c1adc588fb
|
@ -147,6 +147,8 @@ prop_checkBashisms64 = verify checkBashisms "#!/bin/sh\nreadonly -a"
|
||||||
prop_checkBashisms65 = verifyNot checkBashisms "#!/bin/sh\nreadonly -p"
|
prop_checkBashisms65 = verifyNot checkBashisms "#!/bin/sh\nreadonly -p"
|
||||||
prop_checkBashisms66 = verifyNot checkBashisms "#!/bin/sh\ncd -P ."
|
prop_checkBashisms66 = verifyNot checkBashisms "#!/bin/sh\ncd -P ."
|
||||||
prop_checkBashisms67 = verify checkBashisms "#!/bin/sh\ncd -P -e ."
|
prop_checkBashisms67 = verify checkBashisms "#!/bin/sh\ncd -P -e ."
|
||||||
|
prop_checkBashisms68 = verify checkBashisms "#!/bin/sh\numask -p"
|
||||||
|
prop_checkBashisms69 = verifyNot checkBashisms "#!/bin/sh\numask -S"
|
||||||
checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
||||||
params <- ask
|
params <- ask
|
||||||
kludge params t
|
kludge params t
|
||||||
|
@ -297,7 +299,8 @@ checkBashisms = ForShell [Sh, Dash] $ \t -> do
|
||||||
("printf", []),
|
("printf", []),
|
||||||
("read", if isDash then ["r", "p"] else ["r"]),
|
("read", if isDash then ["r", "p"] else ["r"]),
|
||||||
("readonly", ["p"]),
|
("readonly", ["p"]),
|
||||||
("ulimit", if isDash then ["H", "S", "t", "f", "d", "s", "c", "m", "l", "p", "n"] else ["f"])
|
("ulimit", if isDash then ["H", "S", "t", "f", "d", "s", "c", "m", "l", "p", "n"] else ["f"]),
|
||||||
|
("umask", ["S"])
|
||||||
]
|
]
|
||||||
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