mirror of https://github.com/pypa/pip
Merge 2e12c3cfde
into a15dd75d98
This commit is contained in:
commit
ae1e5bdb8b
|
@ -0,0 +1 @@
|
|||
Improve error message on Windows for upgrading pip in place
|
|
@ -628,7 +628,10 @@ def protect_pip_from_modification_on_windows(modifying_pip: bool) -> None:
|
|||
)
|
||||
|
||||
if should_show_use_python_msg:
|
||||
new_command = [sys.executable, "-m", "pip"] + sys.argv[1:]
|
||||
sys_executable = sys.executable
|
||||
if " " in sys_executable:
|
||||
sys_executable = f'"{sys_executable}"'
|
||||
new_command = [sys_executable, "-m", "pip"] + sys.argv[1:]
|
||||
raise CommandError(
|
||||
"To modify pip, please run the following command:\n{}".format(
|
||||
" ".join(new_command)
|
||||
|
|
Loading…
Reference in New Issue