repo 1.6.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBJ03oWFlMNXpIPXGURAk05AJ97t6Z4KvnvAfiBlNN6nIzsXXSzUwCdHpwi
rkOeNF/jRtERE5vGegMyDao=
=JdTp
-----END PGP SIGNATURE-----
Don't start the pager if stdout is a pipe

The repo script often uses a pager by default and will produce
control characters (coloring) to standard output when using the
pager, even if the output is redirected to another pipe or script.
This is because the pager setup checked for the terminal presence
on FD 0, and in case of redirection FD 0 is still attached to
the terminal.

Instead require that both FD 0 and FD 1 are connected to the terminal
in order to start the pager.

Bug: REPO-19, b.android.com/2004
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed