This commit is contained in:
Daylin Morgan 2023-05-28 10:39:15 -05:00
parent 187f070679
commit a350fa30b7
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.5a1-17-gb941594" __version__ = "23.5a1-18-g187f070"
class Config: class Config:
@ -1164,16 +1164,12 @@ class Viv:
# TODO: generalize freeze and this spec generator # TODO: generalize freeze and this spec generator
spec = ", ".join(f'"{req}"' for req in args.reqs) spec = ", ".join(f'"{req}"' for req in args.reqs)
# TODO: split on version specifier characters... use re? # TODO: split first req on version specifier characters... use re?
if len(args.reqs) == 1:
bin = args.reqs[0]
output = c.binparent / args.reqs[0]
else:
if not (args.bin and args.output):
error("please specify an explicit -b/--bin and -o/--output", code=1)
bin = args.bin bin = args.reqs[0] if not args.bin else args.bin
output = args.output.absolute() output = (
c.binparent / args.reqs[0] if not args.output else args.output.absolute()
)
if output.is_file(): if output.is_file():
error(f"{output} already exists...exiting", code=1) error(f"{output} already exists...exiting", code=1)