mirror of
https://github.com/frappe/bench.git
synced 2024-11-12 08:16:28 +00:00
feat: Exiting when app does not exist
This commit is contained in:
parent
2f17da1bf0
commit
fc0be250c2
11
bench/app.py
11
bench/app.py
@ -70,6 +70,11 @@ class AppMeta:
|
|||||||
self.setup_details()
|
self.setup_details()
|
||||||
|
|
||||||
def setup_details(self):
|
def setup_details(self):
|
||||||
|
if not urlparse(self.name).netloc and not os.path.exists(
|
||||||
|
os.path.realpath(self.name)
|
||||||
|
):
|
||||||
|
click.secho(f"{self.name} does not exist!", fg="yellow")
|
||||||
|
return
|
||||||
# fetch meta from installed apps
|
# fetch meta from installed apps
|
||||||
if (
|
if (
|
||||||
not self.to_clone
|
not self.to_clone
|
||||||
@ -220,11 +225,9 @@ class App(AppMeta):
|
|||||||
if self.on_disk:
|
if self.on_disk:
|
||||||
required_deps = os.path.join(self.mount_path, self.repo,'hooks.py')
|
required_deps = os.path.join(self.mount_path, self.repo,'hooks.py')
|
||||||
try:
|
try:
|
||||||
print(required_apps_from_hooks(required_deps, local=True))
|
return required_apps_from_hooks(required_deps, local=True)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
print(f"No dependencies for {self.repo}")
|
return []
|
||||||
finally:
|
|
||||||
return
|
|
||||||
try:
|
try:
|
||||||
required_deps = get_required_deps(self.org, self.repo, self.tag or self.branch)
|
required_deps = get_required_deps(self.org, self.repo, self.tag or self.branch)
|
||||||
return required_apps_from_hooks(required_deps)
|
return required_apps_from_hooks(required_deps)
|
||||||
|
Loading…
Reference in New Issue
Block a user