Skip to content

(🐞) deactivate-ing a poetry shell doesn't work (on windows?) #4993

@KotlinIsland

Description

@KotlinIsland
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Windows 10
  • Poetry version: Poetry (version 1.2.0a2)
  • Link of a Gist with the contents of your pyproject.toml file:
[tool.poetry]
name = "test"
version = "1"
description = "test"
authors = []

Issue

When I am in a shell created by poetry shell the deactivate command doesn't deactivate the env.

To deactivate the virtual environment without leaving the shell use deactivate.
- https://python-poetry.org/docs/basic-usage#activating-the-virtual-environment

> poetry shell
Spawning shell within C:\Users\amongus\AppData\Local\pypoetry\Cache\virtualenvs\test-O3eWbxRl-py3.10
> (Get-Command python).Path
C:\Users\amongus\AppData\Local\pypoetry\Cache\virtualenvs\test-O3eWbxRl-py3.10\Scripts\python.exe
> deactivate
> (Get-Command python).Path
C:\Users\amongus\AppData\Local\pypoetry\Cache\virtualenvs\test-O3eWbxRl-py3.10\Scripts\python.exe
> exit
> (Get-Command python).Path
C:\Users\amongus\AppData\Local\Programs\Python\Python311\python.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions