From c5c8be0ed3572752b6f6427e69c157f0eed33dbe Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 15 Aug 2023 14:34:18 -0500 Subject: [PATCH] fix(#7): don't error if no spec passed to viv run --- src/viv/viv.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/viv/viv.py b/src/viv/viv.py index 3133bb4..b445e98 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -56,7 +56,7 @@ from typing import ( from urllib.error import HTTPError from urllib.request import urlopen -__version__ = "23.8a3-17-g7b5d4ad-dev" +__version__ = "23.8a3-18-g837dbb3-dev" class Spinner: @@ -1701,6 +1701,9 @@ class Viv: env.update({"VIV_SPEC": " ".join(f"'{req}'" for req in spec)}) subprocess_run_quit([sys.executable, scriptpath, *rest], env=env) + elif not spec: + log.warning("using viv with empty spec, skipping vivenv creation") + subprocess_run_quit([sys.executable, scriptpath, *rest]) else: vivenv = ViVenv(spec + deps) if not vivenv.loaded or Env().viv_force: