Skip to content

Commit 0e02dd9

Browse files
Suppress windows relpath exception
1 parent 051f7d4 commit 0e02dd9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ env:
1717
jobs:
1818
test:
1919
strategy:
20+
fail-fast: false
2021
matrix:
2122
os: [ubuntu-latest, windows-latest]
2223
python-version:

pytest_github_actions_annotate_failures/plugin.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11

22
from __future__ import annotations
33

4+
import contextlib
45
import os
56
import sys
67
from typing import TYPE_CHECKING
@@ -111,7 +112,8 @@ def pytest_warning_recorded(self, warning_message, when, nodeid, location): # n
111112
if not rel_path.startswith(".."):
112113
filesystempath = rel_path
113114
else:
114-
filesystempath = os.path.relpath(filesystempath)
115+
with contextlib.suppress(ValueError):
116+
filesystempath = os.path.relpath(filesystempath)
115117

116118
workflow_command = _build_workflow_command(
117119
"warning",

0 commit comments

Comments
 (0)