From 500a313d68637cbd317171c567280a10eaabae3c Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Sun, 25 Feb 2024 17:16:08 +0100 Subject: [PATCH] add master branch deprecation notice --- src/poetry/console/application.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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: