From 3af6058d1bb41025a65b423af028657fe88500f0 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Fri, 21 Apr 2023 15:05:16 +0530 Subject: [PATCH] fix: Archive app for different repo/app names --- bench/app.py | 4 ++-- bench/bench.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bench/app.py b/bench/app.py index 797ec400..95135278 100755 --- a/bench/app.py +++ b/bench/app.py @@ -198,7 +198,7 @@ class App(AppMeta): @step(title="Archiving App {repo}", success="App {repo} Archived") def remove(self, no_backup: bool = False): - active_app_path = os.path.join("apps", self.repo) + active_app_path = os.path.join("apps", self.app_name) if no_backup: if not os.path.islink(active_app_path): @@ -209,7 +209,7 @@ class App(AppMeta): else: archived_path = os.path.join("archived", "apps") archived_name = get_available_folder_name( - f"{self.repo}-{date.today()}", archived_path + f"{self.app_name}-{date.today()}", archived_path ) archived_app_path = os.path.join(archived_path, archived_name) diff --git a/bench/bench.py b/bench/bench.py index cdba9018..c2c70c37 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -131,6 +131,9 @@ class Bench(Base, Validator): except InvalidRemoteException: if not force: raise + except ValueError: + pass + self.apps.sync() # self.build() - removed because it seems unnecessary self.reload(_raise=False)