mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-12-22 02:30:44 -06:00
fix: use _get_user with _update_cache
This commit is contained in:
parent
1bb48eedbc
commit
f21b90d962
1 changed files with 3 additions and 3 deletions
|
@ -2461,7 +2461,6 @@ def _get_user() -> str:
|
|||
|
||||
try:
|
||||
user = getuser()
|
||||
|
||||
except ImportError as e:
|
||||
user = "dummy"
|
||||
log.info(e.msg)
|
||||
|
@ -2773,7 +2772,6 @@ def use(*packages: str, track_exe: bool = False, name: str = "") -> Path:
|
|||
vivenv.meta.addfile(get_caller_path())
|
||||
vivenv.meta.write()
|
||||
vivenv.activate()
|
||||
|
||||
return vivenv.path
|
||||
|
||||
|
||||
|
@ -3385,7 +3383,9 @@ class Viv:
|
|||
if run_mode == "ephemeral":
|
||||
new_cache = tmpdir
|
||||
elif run_mode == "semi-ephemeral":
|
||||
new_cache = str(Path(tempfile.gettempdir()) / "viv-ephemeral-cache")
|
||||
new_cache = str(
|
||||
Path(tempfile.gettempdir()) / ("viv-ephemeral-cache-" + _get_user())
|
||||
)
|
||||
|
||||
env.update({"VIV_CACHE": new_cache})
|
||||
os.environ["VIV_CACHE"] = new_cache
|
||||
|
|
Loading…
Reference in a new issue