Merge pull request #4918 from achillesrasquinha/auto-mysql

[bench mysql autocomplete] fallback to mysql if not exists.
This commit is contained in:
Achilles Rasquinha 2018-01-24 22:41:24 +05:30 committed by GitHub
commit b07b8d5580
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -288,11 +288,12 @@ def mysql(context):
site = get_site(context)
frappe.init(site=site)
mysql = find_executable('mycli')
args = [mysql, '-u', frappe.conf.db_name, '-p'+frappe.conf.db_password, frappe.conf.db_name, '-h', frappe.conf.db_host or "localhost"]
args = ['-u', frappe.conf.db_name, '-p'+frappe.conf.db_password, frappe.conf.db_name, '-h', frappe.conf.db_host or "localhost"]
if not mysql:
mysql = find_executable('mysql')
args.append("-A")
args.insert(0, mysql)
os.execv(mysql, args)
@click.command('console')