Print a warning if input is requested while disabled
This commit is contained in:
parent
afc778096e
commit
8cc906d526
10
gemini-cat.c
10
gemini-cat.c
|
@ -122,9 +122,13 @@ main(int argc, char *argv[])
|
|||
query = NULL;
|
||||
switch (gemini.status / 10) {
|
||||
case 1:
|
||||
if (prompt > 0 && readpassphrase(gemini.meta, b,
|
||||
sizeof(b), prompt > 1 ? RPP_ECHO_OFF :
|
||||
RPP_ECHO_ON) == NULL) {
|
||||
if (prompt == 0) {
|
||||
warnx("User-input is not enabled");
|
||||
break;
|
||||
}
|
||||
if (readpassphrase(gemini.meta, b, sizeof(b),
|
||||
prompt > 1 ? RPP_ECHO_OFF : RPP_ECHO_ON)
|
||||
== NULL) {
|
||||
warn("Could not get user-input");
|
||||
goto err;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue