From 38efaeacec85952b0a0e9235a75748580ed06c49 Mon Sep 17 00:00:00 2001 From: Guy Salton Date: Tue, 25 Jul 2023 22:34:34 +0300 Subject: [PATCH] utils/shell: add support for `vox` in `xonsh` shell (#8203) --- src/poetry/utils/shell.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/poetry/utils/shell.py b/src/poetry/utils/shell.py index d60998f0b0e..290a62c09c1 100644 --- a/src/poetry/utils/shell.py +++ b/src/poetry/utils/shell.py @@ -108,6 +108,8 @@ def activate(self, env: VirtualEnv) -> int | None: if self._name == "zsh": # Under ZSH the source command should be invoked in zsh's bash emulator c.sendline(f"emulate bash -c '. {shlex.quote(str(activate_path))}'") + elif self._name == "xonsh": + c.sendline(f"vox activate {shlex.quote(str(env.path))}") else: cmd = f"{self._get_source_command()} {shlex.quote(str(activate_path))}" if self._name in ["fish", "nu"]: