diff --git a/src/poetry/console/application.py b/src/poetry/console/application.py index 3286c73f80b..48342ea56ad 100644 --- a/src/poetry/console/application.py +++ b/src/poetry/console/application.py @@ -188,6 +188,18 @@ def _run(self, io: IO) -> int: self._load_plugins(io) exit_code: int = super()._run(io) + + import os + + if "PYTEST_CURRENT_TEST" not in os.environ: + io.write_line( + "" + "The Poetry project has renamed the master branch to main. The use of the master " + "branch is now deprecated and the branch will be removed in the near future. Please update your refs " + "to use main branch instead. Alternatively consider using released versions." + "" + ) + return exit_code def _configure_io(self, io: IO) -> None: