Skip to content

Commit 64be885

Browse files
committed
actually go up a dir when looking
1 parent 9aee1c3 commit 64be885

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

python/private/local_runtime_repo.bzl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,11 @@ def _find_python_exe_from_target(rctx):
277277
return base_path, None
278278
attempted_paths = [base_path]
279279

280-
# On Windows, python.exe is in the root, not under `bin/`
281-
path = rctx.path("{}/{}.exe".format(base_path.dirname, base_path.basename))
280+
# On Windows, python.exe is in the root, not under `bin/`, so
281+
# go up a directory
282+
283+
path = base_path.dirname.dirname.relative_paths(base_path.basename)
284+
path = rctx.path("{}.exe".format(path))
282285
if path.exists:
283286
return path, None
284287
attempted_paths.append(path)

0 commit comments

Comments
 (0)