mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Merge pull request #8251 from heewa/pip_vcs_error_msg
Avoid hiding error context in VCS pip install.
This commit is contained in:
commit
f65d7e46c4
@ -178,6 +178,8 @@ def installed(name,
|
||||
ret.setdefault('warnings', []).append(msg)
|
||||
name = repo
|
||||
|
||||
from_vcs = False
|
||||
|
||||
if name:
|
||||
try:
|
||||
try:
|
||||
@ -195,6 +197,7 @@ def installed(name,
|
||||
if name.startswith(supported_vcs):
|
||||
for vcs in supported_vcs:
|
||||
if name.startswith(vcs):
|
||||
from_vcs = True
|
||||
install_req = pip.req.InstallRequirement.from_line(
|
||||
name.split('{0}+'.format(vcs))[-1]
|
||||
)
|
||||
@ -203,7 +206,7 @@ def installed(name,
|
||||
install_req = pip.req.InstallRequirement.from_line(name)
|
||||
except ValueError as exc:
|
||||
ret['result'] = False
|
||||
if '=' in name and '==' not in name:
|
||||
if not from_vcs and '=' in name and '==' not in name:
|
||||
ret['comment'] = (
|
||||
'Invalid version specification in package {0}. \'=\' is '
|
||||
'not supported, use \'==\' instead.'.format(name)
|
||||
|
Loading…
Reference in New Issue
Block a user