From 9a87ec11e794d99336fee6efded1769bb3968adb Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Thu, 18 Jan 2024 13:11:41 +0530 Subject: [PATCH] fix: add command to indicate use-cached support --- frappe/commands/utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index 7d997e012d..e8f420d97b 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -1147,8 +1147,21 @@ def rebuild_global_search(context, static_pages=False): raise SiteNotSpecifiedError +@click.command("can-use-cached") +def can_use_cached() -> None: + """ + Used by bench to check if the installed version of Frappe supports + installing apps from cached get-app artifacts. + + Bench just checks the exit code for this command, if it is not + present then the call to this command will error out. + """ + click.secho("yes", fg="green") + + commands = [ build, + can_use_cached, clear_cache, clear_website_cache, database,