mirror of
https://github.com/apple/swift-nio
synced 2026-11-22 04:30:41 +00:00
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:
1 parent
56f9b7c6fc
commit
100b1f4ff9
1 file changed
+6
@@ -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
|
||||
|
||||
Reference in new issue
Block a user