mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-09 19:13:14 -06:00
fix: correctly use exisiting env
This commit is contained in:
parent
6b48e8c5f1
commit
78b3cf817a
1 changed files with 11 additions and 9 deletions
|
@ -55,7 +55,7 @@ from typing import (
|
|||
from urllib.error import HTTPError
|
||||
from urllib.request import urlopen
|
||||
|
||||
__version__ = "23.8a3-10-g505e79f-dev"
|
||||
__version__ = "23.8a3-11-g6b48e8c-dev"
|
||||
|
||||
|
||||
class Spinner:
|
||||
|
@ -969,6 +969,8 @@ class ViVenv:
|
|||
run_mode = Env().viv_run_mode
|
||||
_path = self.path
|
||||
try:
|
||||
if self.loaded:
|
||||
yield
|
||||
if keep or run_mode == "persist":
|
||||
yield
|
||||
elif run_mode == "ephemeral":
|
||||
|
@ -1734,8 +1736,8 @@ class Viv:
|
|||
_, bin = self._pick_bin(reqs, bin)
|
||||
vivenv = ViVenv(spec)
|
||||
|
||||
if not vivenv.loaded or Env().viv_force:
|
||||
with vivenv.use(keep=keep):
|
||||
if not vivenv.loaded or Env().viv_force:
|
||||
vivenv.create()
|
||||
vivenv.install_pkgs()
|
||||
vivenv.bin_exists(bin)
|
||||
|
|
Loading…
Reference in a new issue