mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 08:16:28 +00:00
feat: Made dynamic mount path if bench attr is passed to App class
This commit is contained in:
parent
49900ce74b
commit
b36c0723be
@ -73,11 +73,10 @@ class AppMeta:
|
||||
|
||||
def setup_details(self):
|
||||
# fetch meta from installed apps
|
||||
if (
|
||||
not self.to_clone
|
||||
and hasattr(self, "bench")
|
||||
and os.path.exists(self.mount_path)
|
||||
if hasattr(self, "bench") and os.path.exists(
|
||||
os.path.join(self.bench.name, "apps", self.name)
|
||||
):
|
||||
self.mount_path = os.path.join(self.bench.name, "apps", self.name)
|
||||
self.from_apps = True
|
||||
self._setup_details_from_mounted_disk()
|
||||
|
||||
|
@ -123,8 +123,7 @@ class Bench(Base, Validator):
|
||||
from bench.app import App
|
||||
|
||||
self.validate_app_uninstall(app)
|
||||
path_to_app = os.path.join(self.name, "apps", app)
|
||||
self.apps.remove(App(path_to_app, bench=self, to_clone=False))
|
||||
self.apps.remove(App(app, bench=self, to_clone=False))
|
||||
self.apps.sync()
|
||||
# self.build() - removed because it seems unnecessary
|
||||
self.reload()
|
||||
|
Loading…
Reference in New Issue
Block a user