2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-08 00:04:38 +00:00

Merge pull request #1360 from resilient-tech/expect-python-exec

fix: dont use glob pattern for `python` exec
This commit is contained in:
gavin 2022-08-07 13:41:40 +05:30 committed by GitHub
commit dea3278535
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -70,7 +70,7 @@ class Bench(Base, Validator):
@property
def python(self) -> str:
return get_env_cmd("python*", bench_path=self.name)
return get_env_cmd("python", bench_path=self.name)
@property
def shallow_clone(self) -> bool:

View File

@ -188,13 +188,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:])
@ -207,7 +207,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 get_env_frappe_commands(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")
try: