Skip to content

Commit cca506d

Browse files
Fix: don't download chromium if it is configured and installed frappe#490
Don't download chromium if it's chromium_binary_path is configured in common_site_config.json and present. If it is not configured, or if it is configured but not present at the configured path, continue with the logic of checking in the bench directory.
1 parent ce3e0c7 commit cca506d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

print_designer/install.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@ def make_chromium_executable(executable):
8181

8282
def find_or_download_chromium_executable():
8383
"""Finds the Chromium executable or downloads if not found."""
84+
85+
"""Fetch from common site config, if present"""
86+
site_config = frappe.get_common_site_config()
87+
chromium_binary_path = site_config.get("chromium_binary_path", "")
88+
if chromium_binary_path:
89+
exec_path = Path(chromium_binary_path)
90+
if exec_path.exists():
91+
return str(exec_path)
92+
else:
93+
click.echo("Chromium is not available at the configured path. Downloading...")
94+
download_chromium()
8495

8596
"""Fetch from common site config, if present"""
8697
site_config = frappe.get_common_site_config()

0 commit comments

Comments
 (0)