mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
replace 'venv' with the module
This commit is contained in:
parent
bb26d8c97c
commit
1075ec077c
1 changed files with 5 additions and 5 deletions
|
@ -27,10 +27,7 @@ KNOWN_BINARY_NAMES = frozenset(
|
|||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
__opts__ = {
|
||||
"venv_bin": salt.utils.path.which_bin(KNOWN_BINARY_NAMES)
|
||||
or f"{sys.executable} -m venv"
|
||||
}
|
||||
__opts__ = {"venv_bin": salt.utils.path.which_bin(KNOWN_BINARY_NAMES) or "venv"}
|
||||
|
||||
__pillar__ = {}
|
||||
|
||||
|
@ -179,7 +176,10 @@ def create(
|
|||
if venv_bin is None:
|
||||
venv_bin = __pillar__.get("venv_bin") or __opts__.get("venv_bin")
|
||||
|
||||
cmd = [venv_bin]
|
||||
if venv_bin == "venv":
|
||||
cmd = [sys.executable, "-m", "venv"]
|
||||
else:
|
||||
cmd = [venv_bin]
|
||||
|
||||
if "venv" not in venv_bin:
|
||||
# ----- Stop the user if venv only options are used ----------------->
|
||||
|
|
Loading…
Add table
Reference in a new issue