mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
fix: check if installed FF supports use-cached
This commit is contained in:
parent
10bb5a4794
commit
d177d8ff63
@ -354,11 +354,17 @@ def build_assets(bench_path=".", app=None, using_cached=False):
|
||||
if app:
|
||||
command += f" --app {app}"
|
||||
|
||||
if using_cached:
|
||||
if using_cached and can_use_cached(bench_path):
|
||||
command += " --using-cached"
|
||||
|
||||
exec_cmd(command, cwd=bench_path, env={"BENCH_DEVELOPER": "1"})
|
||||
|
||||
def can_use_cached(bench_path=".") -> bool:
|
||||
cmd = ["bench", "can-use-cached"]
|
||||
return_code = subprocess.call(
|
||||
cmd, cwd=bench_path, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
|
||||
)
|
||||
return not return_code
|
||||
|
||||
def handle_version_upgrade(version_upgrade, bench_path, force, reset, conf):
|
||||
from bench.utils import log, pause_exec
|
||||
|
Loading…
Reference in New Issue
Block a user