Print alloc-limits-from-test-output usage when no args (#3041)

Motivation:

The alloc-limits-from-test-output doesn't print usage if you don't pass
in a format arg, it just sits and waits for stdin.

Modifications:

Print usage if running interactively

Result:

Easier to get usage
This commit is contained in:
George Barnett authored and GitHub committed 2025-01-07 10:36:03 +00:00
1 parent 56f9b7c6fc
commit 100b1f4ff9
1 file changed
+6
+6
View File
@@ -49,6 +49,12 @@ case "$mode_flag" in
;;
esac
# stdin is coming from a terminal, i.e. nothing is being piped in.
if [[ -t 0 ]]; then
usage
exit 1
fi
function allow_slack() {
raw="$1"
if [[ ! "$raw" =~ ^[0-9]+$ ]]; then