@click.command(u'setup-global-help')
@click.option(u'--mariadb_root_password')
def setup_global_help(mariadb_root_password=None):
 from frappe.installer import update_site_config
 frappe.local.flags = frappe._dict()
 frappe.local.flags.in_setup_help = True
 frappe.local.flags.in_install = True
 frappe.local.lang = u'en'
 frappe.local.conf = frappe.get_site_config(sites_path=u'.')
 update_site_config(u'global_help_setup', 1, site_config_path=os.path.join(u'.', u'common_site_config.json'))
 if mariadb_root_password:
  frappe.local.conf.root_password = mariadb_root_password
 from frappe.utils.help import sync
 sync()

@ click . command ( u'setup-global-help' ) @ click . option ( u'--mariadb_root_password' ) def setup_global_help ( mariadb_root_password = None ) : from frappe . installer import update_site_config frappe . local . flags = frappe . _dict ( ) frappe . local . flags . in_setup_help = True frappe . local . flags . in_install = True frappe . local . lang = u'en' frappe . local . conf = frappe . get_site_config ( sites_path = u'.' ) update_site_config ( u'global_help_setup' , 1 , site_config_path = os . path . join ( u'.' , u'common_site_config.json' ) ) if mariadb_root_password : frappe . local . conf . root_password = mariadb_root_password from frappe . utils . help import sync sync ( )
setup help table in a separate database that will be shared by the whole bench and set global_help_setup as 1 in common_site_config .