Skip to content

Commit 496b1e7

Browse files
committed
Fix search order by looking for the relevant Python executable name first
1 parent 9a60147 commit 496b1e7

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ semver Intersection would incorrectly pass if an exact version is compared again
1313
no overlap.
1414
- #1077: Fixed error handling of dependency resolution to correctly report what the offending
1515
modules are.
16-
- #1191: Fixed issue where configured Python version would not be used automatically
16+
- #1191: Fixed issue where configured Python version would not be used automatically during calls to pip
1717

1818
## [0.10.7] - 2026-05-29
1919

src/cls/IPM/Lifecycle/Base.cls

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -904,14 +904,14 @@ ClassMethod DetectPipCaller(
904904
throw ##class(%Exception.General).%New("Could not find a suitable pip caller. Run: zpm ""config set PipCaller <path>"" and zpm ""config set UseStandalonePip 0"" (python executable) or 1 (pip executable)")
905905
}
906906

907-
/// Looks for the first executable from names found in any of dirs.
908-
/// Returns the full path, or "" if none exists.
907+
/// Looks for executables by searching names in priority order across all dirs.
908+
/// Returns the full path of the highest-priority name found, or "" if none exists.
909909
ClassMethod FindExecutableInDirs(dirs As %List, names As %List) As %String
910910
{
911-
set dirPtr = 0
912-
while $listnext(dirs, dirPtr, dir) {
913-
set namePtr = 0
914-
while $listnext(names, namePtr, name) {
911+
set namePtr = 0
912+
while $listnext(names, namePtr, name) {
913+
set dirPtr = 0
914+
while $listnext(dirs, dirPtr, dir) {
915915
set path = dir _ name
916916
if $$$isWINDOWS {
917917
set path = path _ ".exe"

0 commit comments

Comments
 (0)