From 2650eb64232f378fda78ddaf8279185024317d78 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 29 Mar 2018 08:34:23 +0200 Subject: bin/sanity-check: respect level of silence for pending mysql query error message --- bin/sanity-check | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'bin') 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 -- cgit v1.2.3