Skip to content

Commit

Permalink
fixes #60557 regression pip.installed does not pass env_vars when cal…
Browse files Browse the repository at this point in the history
…ling pip.list
  • Loading branch information
nicholasmhughes committed Dec 21, 2022
1 parent 364d514 commit e253897
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog/60557.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix regression pip.installed does not pass env_vars when calling pip.list
6 changes: 4 additions & 2 deletions salt/states/pip_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e253897

Please sign in to comment.