diff --git a/docs/source/changes.rst b/docs/source/changes.rst index 979e2346..9e153272 100644 --- a/docs/source/changes.rst +++ b/docs/source/changes.rst @@ -15,6 +15,8 @@ all releases are available on `PyPI `_ and - :gh:`194` updates the ``README.rst``. - :gh:`196` references the two new cookiecutters for projects and plugins. - :gh:`198` fixes the documentation of ``@pytask.mark.skipif``. (Closes :gh:`195`) +- :gh:`199` extends the error message when paths are ambiguous on case-insensitive file + systems. 0.1.5 - 2022-01-10 diff --git a/src/_pytask/collect.py b/src/_pytask/collect.py index 29ab0e3d..537a7da3 100644 --- a/src/_pytask/collect.py +++ b/src/_pytask/collect.py @@ -186,10 +186,15 @@ def pytask_collect_task( _TEMPLATE_ERROR: str = ( - "The provided path of the dependency/product in the marker is {}, but the path of " - "the file on disk is {}. Case-sensitive file systems would raise an error.\n\n" + "The provided path of the dependency/product in the marker is\n\n{}\n\n, but the " + "path of the file on disk is\n\n{}\n\nCase-sensitive file systems would raise an " + "error because the upper and lower case format of the paths does not match.\n\n" "Please, align the names to ensure reproducibility on case-sensitive file systems " - "(often Linux or macOS) or disable this error with 'check_casing_of_paths = false'." + "(often Linux or macOS) or disable this error with 'check_casing_of_paths = false' " + " in your pytask configuration file.\n\n" + "Hint: If parts of the path preceding your project directory are not properly " + "formatted, check whether you need to call `.resolve()` on `SRC`, `BLD` or other " + "paths created from the `__file__` attribute of a module." )