[Minor] Added '--admin-password' to by pass admin password prompt on reinstalling the site

This commit is contained in:
shreyas 2016-09-08 13:33:27 +05:30
parent 5b83bb4d27
commit 649696fb93

View file

@ -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')