From 856df4fd503eae22968c8098c31cf6bbcdb6704a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=C3=A1n=20Healy?= Date: Mon, 20 Apr 2026 16:51:17 +0100 Subject: [PATCH] Don't log warnings for `head -cN` related feed exits --- git-portfolio | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-portfolio b/git-portfolio index 5ac74e3..1b62853 100755 --- a/git-portfolio +++ b/git-portfolio @@ -1,11 +1,12 @@ #!/usr/bin/bash -repos="/tmp/repos-$(cat /dev/urandom | base64 | tr -d '=+/' | head -c 8)" +N=/dev/null +repos="/tmp/repos-$(cat /dev/urandom 2>$N | base64 2>$N | tr -d '=+/' 2>$N | head -c 8)" if [ -d "$repos" ]; then echo "Error: Temporary directory '$repos' already exists." >&2 exit 1 fi mkdir -p "$repos" -tmp_portfolio="/tmp/portfolio-$(cat /dev/urandom | base64 | tr -d '=+/' | head -c 8)" +tmp_portfolio="/tmp/portfolio-$(cat /dev/urandom 2>$N | base64 2>$N | tr -d '=+/' 2>$N | head -c 8)" if [ -d "$tmp_portfolio" ]; then echo "Error: Temporary directory '$tmp_portfolio' already exists." >&2 exit 1