mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-14 10:37:26 -07:00
Warn about timing pipelines and compound commands in sh/dash.
This commit is contained in:
parent
2957fb64c9
commit
c91083354f
2 changed files with 32 additions and 4 deletions
|
@ -4,12 +4,12 @@
|
|||
# 'cabal test' remains the source of truth.
|
||||
|
||||
(
|
||||
var=$(echo 'liftM and $ sequence [ShellCheck.Analytics.runTests, ShellCheck.Parser.runTests, ShellCheck.Checker.runTests]' | cabal repl | tee /dev/stderr)
|
||||
var=$(echo 'liftM and $ sequence [ShellCheck.Analytics.runTests, ShellCheck.Parser.runTests, ShellCheck.Checker.runTests]' | cabal repl 2>&1 | tee /dev/stderr)
|
||||
if [[ $var == *$'\nTrue'* ]]
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
grep -C 3 "Fail" <<< "$var"
|
||||
grep -C 3 -e "Fail" -e "Tracing" <<< "$var"
|
||||
exit 1
|
||||
fi
|
||||
) 2>&1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue