From cb621fb0ef13c4db88737213869807166c0980b6 Mon Sep 17 00:00:00 2001 From: finswimmer Date: Tue, 21 Jan 2025 15:15:30 +0100 Subject: [PATCH] fix(cli): make `poetry env activate` an EnvCommand (#10084) A venv is now created upon calling this command if no one exist yet. --- src/poetry/console/commands/env/activate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/poetry/console/commands/env/activate.py b/src/poetry/console/commands/env/activate.py index 0630a7528ca..dd70275ee52 100644 --- a/src/poetry/console/commands/env/activate.py +++ b/src/poetry/console/commands/env/activate.py @@ -6,7 +6,7 @@ import shellingham -from poetry.console.commands.command import Command +from poetry.console.commands.env_command import EnvCommand from poetry.utils._compat import WINDOWS @@ -18,7 +18,7 @@ class ShellNotSupportedError(Exception): """Raised when a shell doesn't have an activator in virtual environment""" -class EnvActivateCommand(Command): +class EnvActivateCommand(EnvCommand): name = "env activate" description = "Print the command to activate a virtual environment."