2
0
mirror of https://github.com/frappe/bench.git synced 2024-06-26 19:23:30 +00:00

fix: get-app on existing apps

get-app to replace existing folder would fail due to bad url generation.

Changes
* Archive old repo instead of overwritting
* Resetting flags in App instance
This commit is contained in:
Gavin D'souza 2022-07-27 14:24:10 +05:30
parent beac865153
commit e03f597ac6

View File

@ -209,6 +209,9 @@ class App(AppMeta):
shutil.move(active_app_path, archived_app_path)
log(f"App moved from {active_app_path} to {archived_app_path}")
self.from_apps = False
self.on_disk = False
@step(title="Installing App {repo}", success="App {repo} Installed")
def install(
self,
@ -419,7 +422,7 @@ def get_app(
"Do you want to continue and overwrite it?"
)
):
shutil.rmtree(cloned_path)
app.remove()
to_clone = True
if to_clone: