File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -581,7 +581,10 @@ local function ensureWindowsUvBuildPip(path)
581581 end
582582
583583 local pythonExe = path .. " \\ python.exe"
584- if not pathExists (pythonExe ) or pathExists (path .. " \\ Scripts\\ pip.exe" ) then
584+ if not pathExists (pythonExe ) then
585+ error (" Cannot install pip: python.exe was not found at " .. pythonExe )
586+ end
587+ if pathExists (path .. " \\ Scripts\\ pip.exe" ) then
585588 return
586589 end
587590
@@ -594,7 +597,7 @@ local function ensureWindowsUvBuildPip(path)
594597 local command = string.format (" %s -E -s -m ensurepip -U --default-pip" , shellQuote (pythonExe ))
595598 local exitCode = os.execute (command )
596599 if not commandSucceeded (exitCode ) then
597- error (" ensurepip failed while installing pip. exit " .. tostring (exitCode ))
600+ error (" ensurepip failed while installing pip. Exit code: " .. tostring (exitCode ))
598601 end
599602
600603 if pathExists (path .. " \\ Scripts\\ pip.exe" ) then
@@ -606,7 +609,7 @@ local function ensureWindowsUvBuildPip(path)
606609 shellQuote (pythonExe ), quotedBundledPath )
607610 exitCode = os.execute (command )
608611 if not commandSucceeded (exitCode ) then
609- error (" pip force-reinstall failed while creating pip scripts. exit " .. tostring (exitCode ))
612+ error (" pip force-reinstall failed while creating pip scripts. Exit code: " .. tostring (exitCode ))
610613 end
611614
612615 if not pathExists (path .. " \\ Scripts\\ pip.exe" ) then
You can’t perform that action at this time.
0 commit comments