From 2da12b27cd054a11bcb8e657764bb27524656ace Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Thu, 18 Jan 2024 16:25:14 +0530 Subject: [PATCH] refactor: set using cached with envvar --- frappe/commands/utils.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/frappe/commands/utils.py b/frappe/commands/utils.py index e8f420d97b..8abbf9ed9c 100644 --- a/frappe/commands/utils.py +++ b/frappe/commands/utils.py @@ -40,6 +40,7 @@ EXTRA_ARGS_CTX = {"ignore_unknown_options": True, "allow_extra_args": True} "--using-cached", is_flag=True, default=False, + envvar="USING_CACHED", help="Skips build and uses cached build artifacts (cache is set by Bench). Ignored if developer_mode enabled.", ) def build( @@ -1147,21 +1148,8 @@ 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,