fix: accept '--' positionals for viv exe

This commit is contained in:
Daylin Morgan 2023-05-28 22:35:44 -05:00
parent bf9249656a
commit 3126a64463
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F

View file

@ -52,7 +52,7 @@ from typing import (
from urllib.error import HTTPError from urllib.error import HTTPError
from urllib.request import urlopen from urllib.request import urlopen
__version__ = "23.5a2-4-gfba2231-dev" __version__ = "23.5a2-4-gc960808-dev"
class Config: class Config:
@ -226,7 +226,8 @@ class Ansi:
Args: Args:
output: text output from subprocess, usually from p.stdout output: text output from subprocess, usually from p.stdout
""" """
if not output:
return
echo("subprocess output:") echo("subprocess output:")
new_output = [f"{self.red}->{self.end} {line}" for line in output.splitlines()] new_output = [f"{self.red}->{self.end} {line}" for line in output.splitlines()]
sys.stdout.write("\n".join(new_output) + "\n") sys.stdout.write("\n".join(new_output) + "\n")
@ -1024,7 +1025,7 @@ class Viv:
f"{pip_path} {' '.join(args.cmd)}" f"{pip_path} {' '.join(args.cmd)}"
if args.exe == "pip" if args.exe == "pip"
else f"{python_path} {' '.join(args.cmd)}" else f"{python_path} {' '.join(args.cmd)}"
) ) + " ".join(args.rest)
echo(f"executing {cmd}") echo(f"executing {cmd}")
run(shlex.split(cmd), verbose=True) run(shlex.split(cmd), verbose=True)