From 63e29becccafbfeca5fa6b08abe731f38505f5e4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 13 Jun 2018 12:16:22 +0200 Subject: bin/prioritize-build-list: do not write to input if it is a pipe --- bin/prioritize-build-list | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/prioritize-build-list') diff --git a/bin/prioritize-build-list b/bin/prioritize-build-list index 87450e3..f68a559 100755 --- a/bin/prioritize-build-list +++ b/bin/prioritize-build-list @@ -92,7 +92,8 @@ verbose_flock ${wait_for_lock} 8 printf 'SELECT row_count();\n' } | \ mysql_run_query | \ - if [ -w "$1" ]; then + if [ -w "$1" ] && \ + [ ! -p "$1" ]; then cat > "$1" else cat >&2 -- cgit v1.2.3-70-g09d2