Skip to content

Commit 100b1f4

Browse files
authored
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
1 parent 56f9b7c commit 100b1f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dev/alloc-limits-from-test-output

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ case "$mode_flag" in
4949
;;
5050
esac
5151

52+
# stdin is coming from a terminal, i.e. nothing is being piped in.
53+
if [[ -t 0 ]]; then
54+
usage
55+
exit 1
56+
fi
57+
5258
function allow_slack() {
5359
raw="$1"
5460
if [[ ! "$raw" =~ ^[0-9]+$ ]]; then

0 commit comments

Comments
 (0)