Use STDERR for error messages.

This commit is contained in:
2026-04-20 15:31:09 +01:00
parent 502b414e67
commit 1b529945d0

View File

@@ -1,13 +1,13 @@
#!/usr/bin/bash
repos="/tmp/repos-$(cat /dev/urandom | base64 | tr -d '=+/' | head -c 8)"
if [ -d "$repos" ]; then
echo "Error: Temporary directory '$repos' already exists."
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)"
if [ -d "$tmp_portfolio" ]; then
echo "Error: Temporary directory '$tmp_portfolio' already exists."
echo "Error: Temporary directory '$tmp_portfolio' already exists." >&2
exit 1
fi
function safely_remove_tmp_repos() {