From 298e8b274c6df3b2498d4fbc1404ada395e17258 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sat, 27 May 2023 16:48:47 -0500 Subject: [PATCH] fix: add some more checks to freeze --- src/viv/viv.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/viv/viv.py b/src/viv/viv.py index f1993a7..7234533 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -948,10 +948,13 @@ class Viv: def freeze(self, args: Namespace) -> None: """create import statement from package spec""" + # TODO: warn user about using anything but standalone when + # self.local_source is 'Not Found' if not args.reqs: - error("must specify a requirement") - sys.exit(1) + error("must specify a requirement", code=1) + if args.path and args.standalone: + error("-p/--path and -s/--standalone are mutually exclusive", code=1) generate_import( args.requirements,