tools/qvm-run: do not color the output unless --pass-io is used
Since no output from VM is passed (and even if it would, it's redirected to /dev/null), there is no need to switch output color. This fixes the case when qvm-run is started in background - the color change would affect further shell output. Fixes QubesOS/qubes-issues#4808
This commit is contained in:
parent
89ee4931fb
commit
b1a191446a
@ -197,8 +197,9 @@ def run_command_single(args, vm):
|
||||
def main(args=None, app=None):
|
||||
'''Main function of qvm-run tool'''
|
||||
args = parser.parse_args(args, app=app)
|
||||
if args.passio:
|
||||
if args.color_output is None and args.filter_esc:
|
||||
args.color_output = '31'
|
||||
args.color_output = 31
|
||||
|
||||
if args.color_stderr is None and os.isatty(sys.stderr.fileno()):
|
||||
args.color_stderr = 31
|
||||
|
Loading…
Reference in New Issue
Block a user