From 35bffaebad48f7c2668d14cb5e1ff03d67816999 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 1 Jun 2023 09:56:51 -0500 Subject: [PATCH] fix: update access time on run/freeze --- src/viv/viv.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/viv/viv.py b/src/viv/viv.py index 363380a..653925f 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -50,7 +50,7 @@ from typing import ( from urllib.error import HTTPError from urllib.request import urlopen -__version__ = "23.5a4-23-gf0e18ac-dev" +__version__ = "23.5a4-25-g3b74384-dev" class Config: @@ -746,6 +746,9 @@ class ViVenv: verbose=bool(os.getenv("VIV_VERBOSE")), ) + def touch(self) -> None: + self.meta.accessed = str(datetime.today()) + def show(self) -> None: _id = ( self.meta.id[:8] @@ -978,6 +981,9 @@ class Viv: else: echo("re-using existing vivenv") + vivenv.touch() + vivenv.meta.write() + echo("see below for import statements\n") if args.standalone: @@ -1210,7 +1216,9 @@ class Viv: else: vivenv.create() vivenv.install_pkgs() - vivenv.meta.write() + + vivenv.touch() + vivenv.meta.write() sys.exit(subprocess.run([vivenv.path / "bin" / bin, *args.rest]).returncode)