]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Add more useful failure message when stdin is an input
authorsenhuang42 <senhuang96@fb.com>
Thu, 24 Sep 2020 20:29:12 +0000 (16:29 -0400)
committersenhuang42 <senhuang96@fb.com>
Thu, 24 Sep 2020 20:29:12 +0000 (16:29 -0400)
programs/util.c

index fd31ee9e121af4da4a2b11daacbf04fe43c483ae..f7436be54fa139a9a6dea6b28c834519765de6c5 100644 (file)
@@ -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();