mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't fail if pip package is already present and pip1 is installed
Refs #21845
This commit is contained in:
parent
831ec680d9
commit
f9406b5828
1 changed files with 6 additions and 1 deletions
|
@ -673,7 +673,12 @@ def installed(name,
|
|||
use_vt=use_vt
|
||||
)
|
||||
|
||||
if pip_install_call and (pip_install_call.get('retcode', 1) == 0):
|
||||
# Check the retcode for success, but don't fail if using pip1 and the package is
|
||||
# already present. Pip1 returns a retcode of 1 (instead of 0 for pip2) if you run
|
||||
# "pip install" without any arguments. See issue #21845.
|
||||
if pip_install_call and \
|
||||
(pip_install_call.get('retcode', 1) == 0 or pip_install_call.get('stdout').startswith(
|
||||
'You must give at least one requirement to install')):
|
||||
ret['result'] = True
|
||||
|
||||
if requirements or editable:
|
||||
|
|
Loading…
Add table
Reference in a new issue