Skip to content

Commit 104ece6

Browse files
authored
A better error message when paths are ambiguous on case-insensitive file systems. (#199)
1 parent 58923d5 commit 104ece6

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

docs/source/changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ all releases are available on `PyPI <https://pypi.org/project/pytask>`_ and
1515
- :gh:`194` updates the ``README.rst``.
1616
- :gh:`196` references the two new cookiecutters for projects and plugins.
1717
- :gh:`198` fixes the documentation of ``@pytask.mark.skipif``. (Closes :gh:`195`)
18+
- :gh:`199` extends the error message when paths are ambiguous on case-insensitive file
19+
systems.
1820

1921

2022
0.1.5 - 2022-01-10

src/_pytask/collect.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,15 @@ def pytask_collect_task(
186186

187187

188188
_TEMPLATE_ERROR: str = (
189-
"The provided path of the dependency/product in the marker is {}, but the path of "
190-
"the file on disk is {}. Case-sensitive file systems would raise an error.\n\n"
189+
"The provided path of the dependency/product in the marker is\n\n{}\n\n, but the "
190+
"path of the file on disk is\n\n{}\n\nCase-sensitive file systems would raise an "
191+
"error because the upper and lower case format of the paths does not match.\n\n"
191192
"Please, align the names to ensure reproducibility on case-sensitive file systems "
192-
"(often Linux or macOS) or disable this error with 'check_casing_of_paths = false'."
193+
"(often Linux or macOS) or disable this error with 'check_casing_of_paths = false' "
194+
" in your pytask configuration file.\n\n"
195+
"Hint: If parts of the path preceding your project directory are not properly "
196+
"formatted, check whether you need to call `.resolve()` on `SRC`, `BLD` or other "
197+
"paths created from the `__file__` attribute of a module."
193198
)
194199

195200

0 commit comments

Comments
 (0)