Merge pull request #1488 from contivero/wait-flags

Check wait flags in dash & POSIX sh
This commit is contained in:
Vidar Holen 2019-02-23 12:56:44 -08:00 committed by GitHub
commit 45021a9b40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -171,6 +171,7 @@ prop_checkBashisms87 = verify checkBashisms "#!/bin/sh\nset -o emacs"
prop_checkBashisms88 = verifyNot checkBashisms "#!/bin/sh\nset -- wget -o foo 'https://some.url'"
prop_checkBashisms89 = verifyNot checkBashisms "#!/bin/sh\nopts=$-\nset -\"$opts\""
prop_checkBashisms90 = verifyNot checkBashisms "#!/bin/sh\nset -o \"$opt\""
prop_checkBashisms91 = verify checkBashisms "#!/bin/sh\nwait -n"
checkBashisms = ForShell [Sh, Dash] $ \t -> do
params <- ask
kludge params t
@ -378,7 +379,8 @@ checkBashisms = ForShell [Sh, Dash] $ \t -> do
("type", Just []),
("ulimit", if isDash then Nothing else Just ["f"]),
("umask", Just ["S"]),
("unset", Just ["f", "v"])
("unset", Just ["f", "v"]),
("wait", Just [])
]
bashism t@(T_SourceCommand id src _) =
let name = fromMaybe "" $ getCommandName src