diff --git a/lib/bup/main.py b/lib/bup/main.py index 226e463fd029..903d28cbfb9d 100755 --- a/lib/bup/main.py +++ b/lib/bup/main.py @@ -198,6 +198,8 @@ fix_stdout = not already_fixed and os.isatty(1) fix_stderr = not already_fixed and os.isatty(2) if fix_stdout or fix_stderr: + _ttymask = (1 if helpers.istty1 else 0) | (2 if helpers.istty2 else 0) + os.environ['BUP_FORCE_TTY'] = str(_ttymask) tty_env = merge_dict(environ, {b'BUP_FORCE_TTY': (b'%d' % ((fix_stdout and 1 or 0)