We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba39d29 commit e48f2b6Copy full SHA for e48f2b6
pytest_github_actions_annotate_failures/plugin.py
@@ -35,7 +35,13 @@ def pytest_runtest_makereport(item, call):
35
workspace = os.environ.get("GITHUB_WORKSPACE")
36
if workspace:
37
full_path = os.path.abspath(filesystempath)
38
- rel_path = os.path.relpath(full_path, workspace)
+ try:
39
+ rel_path = os.path.relpath(full_path, workspace)
40
+ except ValueError:
41
+ # os.path.relpath() will raise ValueError on Windows
42
+ # when full_path and workspace have different mount points.
43
+ # https://github.com/utgwkk/pytest-github-actions-annotate-failures/issues/20
44
+ rel_path = filesystempath
45
if not rel_path.startswith(".."):
46
filesystempath = rel_path
47
0 commit comments