From ef0f8cc17740cd1870d5204e371f63cbd6eff2d5 Mon Sep 17 00:00:00 2001 From: Buddy Date: Tue, 28 Oct 2025 13:26:29 -0700 Subject: [PATCH] Allow bail to use stdin for input --- dot_local/share/buddy/lib/bail.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dot_local/share/buddy/lib/bail.sh b/dot_local/share/buddy/lib/bail.sh index 26b67a0..a0b3f96 100644 --- a/dot_local/share/buddy/lib/bail.sh +++ b/dot_local/share/buddy/lib/bail.sh @@ -1,4 +1,8 @@ -bail() ( - echo >&2 "$@" +bail() { + if [ $# == 0 ]; then + cat >&2 + else + echo >&2 "$@" + fi exit 1 -) +}