2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-10 00:37:51 +00:00

fix: Use python* to match any pattern in env

This commit is contained in:
Gavin D'souza 2022-08-02 11:59:34 +05:30
parent b37135e5b1
commit 24b9af605b
3 changed files with 6 additions and 6 deletions

View File

@ -190,13 +190,13 @@ def change_uid():
def app_cmd(bench_path="."):
f = get_env_cmd("python", bench_path=bench_path)
f = get_env_cmd("python*", bench_path=bench_path)
os.chdir(os.path.join(bench_path, "sites"))
os.execv(f, [f] + ["-m", "frappe.utils.bench_helper"] + sys.argv[1:])
def frappe_cmd(bench_path="."):
f = get_env_cmd("python", bench_path=bench_path)
f = get_env_cmd("python*", bench_path=bench_path)
os.chdir(os.path.join(bench_path, "sites"))
os.execv(f, [f] + ["-m", "frappe.utils.bench_helper", "frappe"] + sys.argv[1:])
@ -216,7 +216,7 @@ def get_frappe_commands():
def get_frappe_help(bench_path="."):
python = get_env_cmd("python", bench_path=bench_path)
python = get_env_cmd("python*", bench_path=bench_path)
sites_path = os.path.join(bench_path, "sites")
try:
out = get_cmd_output(

View File

@ -227,5 +227,5 @@ def pip(ctx, args):
from bench.utils.bench import get_env_cmd
env_py = get_env_cmd("python")
env_py = get_env_cmd("python*")
os.execv(env_py, (env_py, "-m", "pip") + args)

View File

@ -231,7 +231,7 @@ def run_frappe_cmd(*args, **kwargs):
from bench.utils.bench import get_env_cmd
bench_path = kwargs.get("bench_path", ".")
f = get_env_cmd("python", bench_path=bench_path)
f = get_env_cmd("python*", bench_path=bench_path)
sites_dir = os.path.join(bench_path, "sites")
is_async = not from_command_line
@ -386,7 +386,7 @@ def generate_command_cache(bench_path=".") -> List:
"""
from bench.utils.bench import get_env_cmd
python = get_env_cmd("python", bench_path=bench_path)
python = get_env_cmd("python*", bench_path=bench_path)
sites_path = os.path.join(bench_path, "sites")
if os.path.exists(bench_cache_file):