fixes saltstack/salt#60557 regression pip.installed does not pass env_vars when calling pip.list

This commit is contained in:
nicholasmhughes 2022-12-21 10:14:49 -05:00
parent 364d514df2
commit e253897675
No known key found for this signature in database
GPG key ID: CB87254A2EA67E01
2 changed files with 5 additions and 2 deletions

1
changelog/60557.fixed Normal file
View file

@ -0,0 +1 @@
Fix regression pip.installed does not pass env_vars when calling pip.list

View file

@ -845,9 +845,11 @@ def installed(
# No requirements case.
# Check pre-existence of the requested packages.
else:
# Attempt to pre-cache a the current pip list
# Attempt to pre-cache the current pip list
try:
pip_list = __salt__["pip.list"](bin_env=bin_env, user=user, cwd=cwd)
pip_list = __salt__["pip.list"](
bin_env=bin_env, user=user, cwd=cwd, env_vars=env_vars
)
# If we fail, then just send False, and we'll try again in the next function call
except Exception as exc: # pylint: disable=broad-except
log.exception(exc)