Skip to content

Commit e195897

Browse files
committed
CI: Fix Windows path handling
"COPY X FROM Y" must use paths in URI format on Windows, see https://docs.microsoft.com/en-us/archive/blogs/ie/file-uris-in-windows
1 parent 9773445 commit e195897

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/crate/testing/tests.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,23 @@
2121
# software solely pursuant to the terms of the relevant commercial agreement.
2222

2323
import os
24+
import pathlib
25+
import sys
2426
import unittest
2527
import doctest
2628
import tempfile
2729
from .test_layer import LayerUtilsTest
2830

2931

3032
def docs_path(*parts):
31-
return os.path.abspath(
33+
path = os.path.abspath(
3234
os.path.join(
3335
os.path.dirname(os.path.dirname(__file__)), *parts
3436
)
3537
)
38+
if sys.platform == 'win32':
39+
path = pathlib.PureWindowsPath(path).as_uri()
40+
return path
3641

3742

3843
def project_root(*parts):

0 commit comments

Comments
 (0)