mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Fixed pip.install for windows
This commit is contained in:
parent
3001b727ef
commit
3792ea1d10
@ -361,7 +361,10 @@ def _run(cmd,
|
||||
)
|
||||
|
||||
if python_shell is not True and not isinstance(cmd, list):
|
||||
cmd = shlex.split(cmd)
|
||||
posix = True
|
||||
if salt.utils.is_windows():
|
||||
posix = False
|
||||
cmd = shlex.split(cmd, posix=posix)
|
||||
if not use_vt:
|
||||
# This is where the magic happens
|
||||
try:
|
||||
|
@ -504,9 +504,14 @@ def install(pkgs=None, # pylint: disable=R0912,R0913,R0914
|
||||
# they would survive the previous line (in the pip.installed state).
|
||||
# Put the commas back in while making sure the names are contained in
|
||||
# quotes, this allows for proper version spec passing salt>=0.17.0
|
||||
cmd.extend(
|
||||
['{0!r}'.format(p.replace(';', ',')) for p in pkgs]
|
||||
)
|
||||
if salt.utils.is_windows():
|
||||
cmd.extend(
|
||||
['{0}'.format(p.replace(';', ',')) for p in pkgs]
|
||||
)
|
||||
else:
|
||||
cmd.extend(
|
||||
['{0!r}'.format(p.replace(';', ',')) for p in pkgs]
|
||||
)
|
||||
|
||||
if editable:
|
||||
egg_match = re.compile(r'(?:#|#.*?&)egg=([^&]*)')
|
||||
|
Loading…
Reference in New Issue
Block a user