diff options
author | Erich Eckner <git@eckner.net> | 2018-03-29 08:34:23 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-03-29 08:34:23 +0200 |
commit | 2650eb64232f378fda78ddaf8279185024317d78 (patch) | |
tree | 7d955c492cf6c2f6c1ca3b0c294a73d16ae1804c /bin/sanity-check | |
parent | 2cf5234736d6d5dfbe6d661e0d2ac917724dc3bd (diff) | |
download | builder-2650eb64232f378fda78ddaf8279185024317d78.tar.xz |
bin/sanity-check: respect level of silence for pending mysql query error message
Diffstat (limited to 'bin/sanity-check')
-rwxr-xr-x | bin/sanity-check | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/sanity-check b/bin/sanity-check index 2da1605..0a81343 100755 --- a/bin/sanity-check +++ b/bin/sanity-check @@ -414,9 +414,16 @@ while [ $# -gt 0 ]; do # hopefully, this gets rid of false positives :-) sleep 1 - if find "${work_dir}" -mindepth 1 -maxdepth 1 -name 'tmp.mysql-functions.query.*' | \ - grep '\S' >> \ - "${tmp_dir}/messages"; then + errors=$( + find "${work_dir}" -mindepth 1 -maxdepth 1 \ + -name 'tmp.mysql-functions.query.*' + ) + if [ -n "${errors}" ]; then + if [ ${silence} -le 1 ]; then + printf '\nThere are pending mysql queries:\n%s\n' \ + "${errors}" + fi >> \ + "${tmp_dir}/messages" i_am_insane fi |