mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
fix get_frappe_commands
This commit is contained in:
parent
b659e595a2
commit
76999e9ed8
@ -102,6 +102,8 @@ def frappe_cmd(bench='.'):
|
||||
def get_frappe_commands(bench='.'):
|
||||
python = get_env_cmd('python', bench=bench)
|
||||
sites_path = os.path.join(bench, 'sites')
|
||||
if not os.path.exists(sites_path):
|
||||
return []
|
||||
try:
|
||||
return json.loads(get_cmd_output("{python} -m frappe.utils.bench_helper get-frappe-commands".format(python=python), cwd=sites_path))
|
||||
except subprocess.CalledProcessError:
|
||||
@ -110,6 +112,8 @@ def get_frappe_commands(bench='.'):
|
||||
def get_frappe_help(bench='.'):
|
||||
python = get_env_cmd('python', bench=bench)
|
||||
sites_path = os.path.join(bench, 'sites')
|
||||
if not os.path.exists(sites_path):
|
||||
return []
|
||||
try:
|
||||
out = get_cmd_output("{python} -m frappe.utils.bench_helper get-frappe-help".format(python=python), cwd=sites_path)
|
||||
return "Framework commands:\n" + out.split('Commands:')[1]
|
||||
|
Loading…
Reference in New Issue
Block a user