From bdea52f37392e95fda22835009a34aa235b17514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vedran=20Mileti=C4=87?= Date: Mon, 3 Mar 2025 16:32:14 +0100 Subject: [PATCH] fix(env): use csh activation script for tcsh --- src/poetry/console/commands/env/activate.py | 2 +- tests/console/commands/env/test_activate.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/poetry/console/commands/env/activate.py b/src/poetry/console/commands/env/activate.py index dd70275ee52..5f0913fdfaa 100644 --- a/src/poetry/console/commands/env/activate.py +++ b/src/poetry/console/commands/env/activate.py @@ -44,7 +44,7 @@ def _get_activate_command(self, env: Env) -> str: command, filename = "source", "activate.fish" elif shell == "nu": command, filename = "overlay use", "activate.nu" - elif shell == "csh": + elif shell in ["csh", "tcsh"]: command, filename = "source", "activate.csh" elif shell in ["powershell", "pwsh"]: command, filename = ".", "Activate.ps1" diff --git a/tests/console/commands/env/test_activate.py b/tests/console/commands/env/test_activate.py index e4b9753e8f0..bea0e6df042 100644 --- a/tests/console/commands/env/test_activate.py +++ b/tests/console/commands/env/test_activate.py @@ -28,6 +28,7 @@ def tester(command_tester_factory: CommandTesterFactory) -> CommandTester: ("fish", "source", ".fish"), ("nu", "overlay use", ".nu"), ("csh", "source", ".csh"), + ("tcsh", "source", ".csh"), ), ) @pytest.mark.skipif(WINDOWS, reason="Only Unix shells")