diff --git a/src/poetry/utils/shell.py b/src/poetry/utils/shell.py index d5b23288540..cf92e9abc6f 100644 --- a/src/poetry/utils/shell.py +++ b/src/poetry/utils/shell.py @@ -106,7 +106,7 @@ def activate(self, env: VirtualEnv) -> int | None: c.setecho(False) 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))}'") + c.sendline(f'''emulate bash -c ". {shlex.quote(str(activate_path))}"''') else: c.sendline( f"{self._get_source_command()} {shlex.quote(str(activate_path))}"