Skip to content

Commit

Permalink
MFC: r239663, r239664
Browse files Browse the repository at this point in the history
change ALWAYS_ASSUME_YES to ASSUME_ALWAYS_YES for consistency with pkg(8)
if not on a tty prompt about the missing pkg(8) but default on 'no' except if
ASSUME_ALWAYS_YES is set

Approved by:	re (kib)
  • Loading branch information
bapt committed Sep 10, 2012
1 parent b4703c9 commit 740aa27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions usr.sbin/pkg/pkg.c
Expand Up @@ -425,9 +425,11 @@ main(__unused int argc, char *argv[])
* not tty. Check the environment to see if user has answer
* tucked in there already.
*/
if (getenv("ALWAYS_ASSUME_YES") == NULL &&
isatty(fileno(stdin))) {
if (getenv("ASSUME_ALWAYS_YES") == NULL) {
printf("%s", confirmation_message);
if (!isatty(fileno(stdin)))
exit(EXIT_FAILURE);

if (pkg_query_yes_no() == 0)
exit(EXIT_FAILURE);
}
Expand Down

0 comments on commit 740aa27

Please sign in to comment.