From e701cf6fadd3b7c01231f6faac0bd18b27d72448 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 3 Nov 2019 13:25:35 -0800 Subject: [PATCH] Warn about [ x -ot y ] in POSIX mode --- src/ShellCheck/Checks/ShellSupport.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Checks/ShellSupport.hs b/src/ShellCheck/Checks/ShellSupport.hs index 83d23fb..07dfdda 100644 --- a/src/ShellCheck/Checks/ShellSupport.hs +++ b/src/ShellCheck/Checks/ShellSupport.hs @@ -205,7 +205,7 @@ checkBashisms = ForShell [Sh, Dash] $ \t -> do | op `elem` [ "<", ">", "\\<", "\\>", "<=", ">=", "\\<=", "\\>="] = unless isDash $ warnMsg id $ "lexicographical " ++ op ++ " is" bashism (TC_Binary id SingleBracket op _ _) - | op `elem` [ "-nt", "-ef" ] = + | op `elem` [ "-ot", "-nt", "-ef" ] = unless isDash $ warnMsg id $ op ++ " is" bashism (TC_Binary id SingleBracket "==" _ _) = warnMsg id "== in place of = is"