From bff029dca3e198de5d8d9d129a4e621ebab6a94d Mon Sep 17 00:00:00 2001 From: bgodlin <37313677+bgodlin@users.noreply.github.com> Date: Sun, 23 Feb 2025 07:22:37 +0100 Subject: [PATCH] Fix `installer.py` (#1571) * Update installer.py Revising the `installer.py` script. The script is facing an issue during execution as it required interactive input for the root username unless the username was provided as a flag https://github.com/frappe/frappe/blob/42f9e537d0de84bdcd540281d5f8149ea5d50eaa/frappe/installer.py#L157-L158. Resolving this by passing the username as a flag allows the script to proceed successfully. * ci: pin pre-commit/prettier to 3.5.2 --------- Co-authored-by: Revant Nandgaonkar --- .pre-commit-config.yaml | 2 ++ development/installer.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 11aa7e45..932c7f93 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,8 @@ repos: rev: v4.0.0-alpha.8 hooks: - id: prettier + additional_dependencies: + - prettier@3.5.2 - repo: https://github.com/codespell-project/codespell rev: v2.4.1 diff --git a/development/installer.py b/development/installer.py index f977b822..edd62147 100755 --- a/development/installer.py +++ b/development/installer.py @@ -207,6 +207,7 @@ def create_site_in_bench(args): new_site_cmd = [ "bench", "new-site", + f"--db-root-username=root", f"--db-host=mariadb", # Should match the compose service name f"--db-type={args.db_type}", # Add the selected database type f"--mariadb-user-host-login-scope=%", @@ -222,6 +223,7 @@ def create_site_in_bench(args): new_site_cmd = [ "bench", "new-site", + f"--db-root-username=root", f"--db-host=postgresql", # Should match the compose service name f"--db-type={args.db_type}", # Add the selected database type f"--db-root-password=123", # Replace with your PostgreSQL password