Fix confirmation logic when detecting a tty
Reported by: mjg
This commit is contained in:
parent
3a480126c4
commit
204ea792b3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=239664
@ -427,10 +427,10 @@ main(__unused int argc, char *argv[])
|
|||||||
*/
|
*/
|
||||||
if (getenv("ASSUME_ALWAYS_YES") == NULL) {
|
if (getenv("ASSUME_ALWAYS_YES") == NULL) {
|
||||||
printf("%s", confirmation_message);
|
printf("%s", confirmation_message);
|
||||||
if (isatty(fileno(stdin)) &&
|
if (!isatty(fileno(stdin)))
|
||||||
pkg_query_yes_no() == 0)
|
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
else
|
|
||||||
|
if (pkg_query_yes_no() == 0)
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
if (bootstrap_pkg() != 0)
|
if (bootstrap_pkg() != 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user