mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-10 03:13:14 -06:00
simplify
This commit is contained in:
parent
187f070679
commit
a350fa30b7
1 changed files with 6 additions and 10 deletions
|
@ -52,7 +52,7 @@ from typing import (
|
|||
from urllib.error import HTTPError
|
||||
from urllib.request import urlopen
|
||||
|
||||
__version__ = "23.5a1-17-gb941594"
|
||||
__version__ = "23.5a1-18-g187f070"
|
||||
|
||||
|
||||
class Config:
|
||||
|
@ -1164,16 +1164,12 @@ class Viv:
|
|||
# TODO: generalize freeze and this spec generator
|
||||
spec = ", ".join(f'"{req}"' for req in args.reqs)
|
||||
|
||||
# TODO: split 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)
|
||||
# TODO: split first req on version specifier characters... use re?
|
||||
|
||||
bin = args.bin
|
||||
output = args.output.absolute()
|
||||
bin = args.reqs[0] if not args.bin else args.bin
|
||||
output = (
|
||||
c.binparent / args.reqs[0] if not args.output else args.output.absolute()
|
||||
)
|
||||
|
||||
if output.is_file():
|
||||
error(f"{output} already exists...exiting", code=1)
|
||||
|
|
Loading…
Reference in a new issue