diff --git a/readthedocs/telemetry/collectors.py b/readthedocs/telemetry/collectors.py index 05cba855bf1..8c3b2237034 100644 --- a/readthedocs/telemetry/collectors.py +++ b/readthedocs/telemetry/collectors.py @@ -92,8 +92,28 @@ def collect(self): }, } data["doctool"] = self._get_doctool() + + # NOTE: Check if there are files at `_build/html` (the old output directory) + # and log these projects so we can communicate with their maintainers + # + # This temporal and should be removed in the future once we have + # decided what to do with this collected data. + self._check_using_old_output_directory() + return data + def _check_using_old_output_directory(self): + code, _, _ = self.run( + "test", + "-x", + "_build/html", + cwd=self.project.checkout_path(self.version.slug), + ) + if code == 0: + log.warning( + "Directory '_build/html' exists. This may lead to unexpected behavior." + ) + def _get_doctool_name(self): if self.version.is_sphinx_type: return "sphinx"