Use IS_CONSOLE macro to detect that we're indeed using a console
This commit is contained in:
parent
05622992d5
commit
7aa3da1cd7
@ -90,6 +90,10 @@ int g_utilDisplayLevel;
|
|||||||
int UTIL_requireUserConfirmation(const char* prompt, const char* abortMsg,
|
int UTIL_requireUserConfirmation(const char* prompt, const char* abortMsg,
|
||||||
const char* acceptableLetters) {
|
const char* acceptableLetters) {
|
||||||
int ch, result;
|
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);
|
UTIL_DISPLAY("%s", prompt);
|
||||||
ch = getchar();
|
ch = getchar();
|
||||||
result = 0;
|
result = 0;
|
||||||
|
@ -309,7 +309,6 @@ test -f precompressedFilterTestDir/input.5.zst.zst
|
|||||||
test -f precompressedFilterTestDir/input.6.zst.zst
|
test -f precompressedFilterTestDir/input.6.zst.zst
|
||||||
println "Test completed"
|
println "Test completed"
|
||||||
|
|
||||||
|
|
||||||
println "\n===> recursive mode test "
|
println "\n===> recursive mode test "
|
||||||
# combination of -r with empty list of input file
|
# combination of -r with empty list of input file
|
||||||
zstd -c -r < tmp > tmp.zst
|
zstd -c -r < tmp > tmp.zst
|
||||||
|
Loading…
x
Reference in New Issue
Block a user