From ba4fee7b1956f5bdda65e2de294fa5e8dfbb84b1 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Wed, 1 Nov 2023 15:10:40 +0200 Subject: [PATCH] Fix agent.package_manager.poetry_install_extra_args are used in all Poetry commands and not just in install (#173) --- clearml_agent/helper/package/poetry_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clearml_agent/helper/package/poetry_api.py b/clearml_agent/helper/package/poetry_api.py index def9387..45480dd 100644 --- a/clearml_agent/helper/package/poetry_api.py +++ b/clearml_agent/helper/package/poetry_api.py @@ -69,7 +69,7 @@ def run(self, *args, **kwargs): path = path.replace(':'+sys.base_prefix, ':'+sys.real_prefix, 1) kwargs['env']['PATH'] = path - if self.session and self.session.config: + if self.session and self.session.config and args and args[0] == "install": extra_args = self.session.config.get("agent.package_manager.poetry_install_extra_args", None) if extra_args: args = args + tuple(extra_args)