mirror of
https://github.com/facebook/zstd.git
synced 2025-07-29 11:21:22 +03:00
Use IS_CONSOLE macro to detect that we're indeed using a console
This commit is contained in:
@ -90,6 +90,10 @@ int g_utilDisplayLevel;
|
||||
int UTIL_requireUserConfirmation(const char* prompt, const char* abortMsg,
|
||||
const char* acceptableLetters) {
|
||||
int ch, result;
|
||||
/* If input is presented via stdin, dont use prompt as it may swallow characters */
|
||||
if (!IS_CONSOLE(stdin))
|
||||
return 0;
|
||||
|
||||
UTIL_DISPLAY("%s", prompt);
|
||||
ch = getchar();
|
||||
result = 0;
|
||||
|
Reference in New Issue
Block a user