Add more useful failure message when stdin is an input
This commit is contained in:
parent
93d63eaeb8
commit
88f4410390
@ -91,8 +91,10 @@ int UTIL_requireUserConfirmation(const char* prompt, const char* abortMsg,
|
|||||||
const char* acceptableLetters, int hasStdinInput) {
|
const char* acceptableLetters, int hasStdinInput) {
|
||||||
int ch, result;
|
int ch, result;
|
||||||
|
|
||||||
if (hasStdinInput)
|
if (hasStdinInput) {
|
||||||
|
UTIL_DISPLAY("Stdin is an input - not proceeding.\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
UTIL_DISPLAY("%s", prompt);
|
UTIL_DISPLAY("%s", prompt);
|
||||||
ch = getchar();
|
ch = getchar();
|
||||||
|
Loading…
Reference in New Issue
Block a user