index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Olivier Brunel <i.am.jack.mail@gmail.com> | 2012-01-12 16:08:48 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-01-18 21:59:54 -0600 |
commit | d9af1a0cf2383eed009ed2bedfb1b34f1a5c7418 (patch) | |
tree | 3ed51d57dcd8b6fe3196a34fe1e75191a01d8012 | |
parent | 4e60b9646d69227c6c9f226bf03a12158feaaee7 (diff) |
-rw-r--r-- | src/pacman/util.c | 6 |
diff --git a/src/pacman/util.c b/src/pacman/util.c index e4e44c63..d72509a5 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -1365,6 +1365,12 @@ static int question(short preset, char *fmt, va_list args) return preset; } + /* if stdin is piped, response does not get printed out, and as a result + * a \n is missing, resulting in broken output (FS#27909) */ + if(!isatty(fileno(stdin))) { + fprintf(stream, "%s\n", response); + } + if(strcasecmp(response, _("Y")) == 0 || strcasecmp(response, _("YES")) == 0) { return 1; } else if(strcasecmp(response, _("N")) == 0 || strcasecmp(response, _("NO")) == 0) { |