8000 fix: make sure windows uses forward slashes · bazel-contrib/rules_python@2f9c9cf · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f9c9cf

Browse files
committed
fix: make sure windows uses forward slashes
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
1 parent a41b8ca commit 2f9c9cf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/pip_install/tools/dependency_resolver/dependency_resolver.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
# Replace the os.replace function with shutil.copy to work around os.replace not being able to
2626
# replace or move files across filesystems.
2727
os.replace = shutil.copy
28+
# We make sure that the separator used by all platforms is the same when joining paths.
29+
os.path._get_sep = lambda path: b"/" if isinstance(path, bytes) else "/"
2830

2931

3032
def _select_golden_requirements_file(

0 commit comments

Comments
 (0)
0