From: senhuang42 Date: Thu, 24 Sep 2020 20:29:12 +0000 (-0400) Subject: Add more useful failure message when stdin is an input X-Git-Tag: v1.4.7~68^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88f4410390e9b727bddcc3c0d141cc402d35a553;p=thirdparty%2Fzstd.git Add more useful failure message when stdin is an input --- 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();