mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +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:
commit
dea3278535
@ -70,7 +70,7 @@ class Bench(Base, Validator):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def python(self) -> str:
|
def python(self) -> str:
|
||||||
return get_env_cmd("python*", bench_path=self.name)
|
return get_env_cmd("python", bench_path=self.name)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def shallow_clone(self) -> bool:
|
def shallow_clone(self) -> bool:
|
||||||
|
@ -188,13 +188,13 @@ def change_uid():
|
|||||||
|
|
||||||
|
|
||||||
def app_cmd(bench_path="."):
|
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.chdir(os.path.join(bench_path, "sites"))
|
||||||
os.execv(f, [f] + ["-m", "frappe.utils.bench_helper"] + sys.argv[1:])
|
os.execv(f, [f] + ["-m", "frappe.utils.bench_helper"] + sys.argv[1:])
|
||||||
|
|
||||||
|
|
||||||
def frappe_cmd(bench_path="."):
|
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.chdir(os.path.join(bench_path, "sites"))
|
||||||
os.execv(f, [f] + ["-m", "frappe.utils.bench_helper", "frappe"] + sys.argv[1:])
|
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="."):
|
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")
|
sites_path = os.path.join(bench_path, "sites")
|
||||||
try:
|
try:
|
||||||
out = get_cmd_output(
|
out = get_cmd_output(
|
||||||
|
@ -227,5 +227,5 @@ def pip(ctx, args):
|
|||||||
|
|
||||||
from bench.utils.bench import get_env_cmd
|
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)
|
os.execv(env_py, (env_py, "-m", "pip") + args)
|
||||||
|
@ -231,7 +231,7 @@ def run_frappe_cmd(*args, **kwargs):
|
|||||||
from bench.utils.bench import get_env_cmd
|
from bench.utils.bench import get_env_cmd
|
||||||
|
|
||||||
bench_path = kwargs.get("bench_path", ".")
|
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")
|
sites_dir = os.path.join(bench_path, "sites")
|
||||||
|
|
||||||
is_async = not from_command_line
|
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
|
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")
|
sites_path = os.path.join(bench_path, "sites")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user