From 88f4410390e9b727bddcc3c0d141cc402d35a553 Mon Sep 17 00:00:00 2001 From: senhuang42 Date: Thu, 24 Sep 2020 16:29:12 -0400 Subject: [PATCH] Add more useful failure message when stdin is an input --- programs/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/programs/util.c b/programs/util.c index fd31ee9e1..f7436be54 100644 --- a/programs/util.c +++ b/programs/util.c @@ -91,8 +91,10 @@ int UTIL_requireUserConfirmation(const char* prompt, const char* abortMsg, const char* acceptableLetters, int hasStdinInput) { int ch, result; - if (hasStdinInput) + if (hasStdinInput) { + UTIL_DISPLAY("Stdin is an input - not proceeding.\n"); return 1; + } UTIL_DISPLAY("%s", prompt); ch = getchar();