qvm-run: allow --localcmd with --pass-io, even when --all is given

With --localcmd, stdin/out are connected to that local process (instead
of a terminal), so it doesn't conflict with --all.

QubesOS/qubes-issues#1728
This commit is contained in:
Marek Marczykowski-Górecki 2016-02-08 04:50:05 +01:00
parent 9fa090b422
commit 6378e2bd20
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -129,14 +129,14 @@ def main():
(options, args) = parser.parse_args ()
if options.passio and options.run_on_all_running:
if (options.passio and not options.localcmd) and options.run_on_all_running:
parser.error ("Options --all and --pass-io cannot be used together")
if options.passio:
options.verbose = False
if options.color_output is None:
if os.isatty(sys.stdout.fileno()):
if os.isatty(sys.stdout.fileno()) and not options.localcmd:
options.color_output = 31
elif options.color_output is False:
options.color_output = None
@ -180,8 +180,6 @@ def main():
continue
if (options.unpause and vm.is_paused()) or (not options.unpause and vm.is_running()):
vms_list.append (vm)
# disable options incompatible with --all
options.passio = False
else:
vm = qvm_collection.get_vm_by_name(vmname)
if vm is None: