mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Improve pip target override condition
This commit is contained in:
parent
9b5f047f98
commit
3ad2037a39
1 changed files with 4 additions and 3 deletions
|
@ -253,7 +253,6 @@ def _get_env_activate(bin_env):
|
|||
|
||||
|
||||
def _find_req(link):
|
||||
|
||||
logger.info("_find_req -- link = %s", link)
|
||||
|
||||
with salt.utils.files.fopen(link) as fh_link:
|
||||
|
@ -849,9 +848,11 @@ def install(
|
|||
cmd.extend(["--build", build])
|
||||
|
||||
# Use VENV_PIP_TARGET environment variable value as target
|
||||
# if set and no target specified on the function call
|
||||
# if set and no target specified on the function call.
|
||||
# Do not set target if bin_env specified, use default
|
||||
# for specified binary environment or expect explicit target specification.
|
||||
target_env = os.environ.get("VENV_PIP_TARGET", None)
|
||||
if target is None and target_env is not None:
|
||||
if target is None and target_env is not None and bin_env is None:
|
||||
target = target_env
|
||||
|
||||
if target:
|
||||
|
|
Loading…
Add table
Reference in a new issue