From 649696fb93a5b2b18e51bf8947dfed70a42ba2c7 Mon Sep 17 00:00:00 2001 From: shreyas Date: Thu, 8 Sep 2016 13:33:27 +0530 Subject: [PATCH] [Minor] Added '--admin-password' to by pass admin password prompt on reinstalling the site --- frappe/commands/site.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frappe/commands/site.py b/frappe/commands/site.py index b2707a8e15..c291780da3 100755 --- a/frappe/commands/site.py +++ b/frappe/commands/site.py @@ -110,9 +110,10 @@ def restore(context, sql_file_path, mariadb_root_username=None, mariadb_root_pas os.remove(private) @click.command('reinstall') +@click.option('--admin-password', help='Administrator Password for reinstalled site') @click.option('--yes', is_flag=True, default=False, help='Pass --yes to skip confirmation') @pass_context -def reinstall(context, yes=False): +def reinstall(context, admin_password=None, yes=False): "Reinstall site ie. wipe all data and start over" if not yes: @@ -134,7 +135,7 @@ def reinstall(context, yes=False): frappe.init(site=site) _new_site(frappe.conf.db_name, site, verbose=context.verbose, force=True, reinstall=True, - install_apps=installed) + install_apps=installed, admin_password=admin_password) @click.command('install-app') @click.argument('app')