Skip to content

Commit

Permalink
Update shell.py
Browse files Browse the repository at this point in the history
fix zsh: poetry shell doesn't work if space character in .venv path

python-poetry#7244
  • Loading branch information
dimstunt authored Dec 23, 2022
1 parent 6e84663 commit 19133be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/poetry/utils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))}"
Expand Down

0 comments on commit 19133be

Please sign in to comment.