Skip to content

fix: "already activated" message but shell is not active#57

Open
kenttonino wants to merge 3 commits intopython-poetry:mainfrom
kenttonino:fix/should-return-false-if-poetry-active-but-not-virtual-env
Open

fix: "already activated" message but shell is not active#57
kenttonino wants to merge 3 commits intopython-poetry:mainfrom
kenttonino:fix/should-return-false-if-poetry-active-but-not-virtual-env

Conversation

@kenttonino
Copy link
Copy Markdown

@kenttonino kenttonino commented Apr 9, 2026

Summary

  • Fixes Poetry shell command does not start shell #21
  • If we have a newly created shell, then deactivate, then activate the shell again, it will only show a message that Virtual environment already activated, but its not activated.
    • The problem is that we only check if the POETRY_ACTIVE is set, but not the VIRTUAL_ENV.


Changes

  • command.py:
    • If the POETRY_ACTIVE is set but not the VIRTUAL_ENV, pop the POETRY_ACTIVE.


Test Plan

Test 1

  • Create shell.
  • Deactivate the shell.
  • Activate again the shell.
    • It should activate the shell.

Test 2

  • Activate the shell.
  • Then, activate again.
    • It should show Virtual environment already activated.

@kenttonino kenttonino changed the title [ fix ] Should Return False if POETRY_ACTIVE is true but not VIRTUAL_ENV [ fix ] Already Activated But Shell Is Not Active Apr 9, 2026
@kenttonino kenttonino changed the title [ fix ] Already Activated But Shell Is Not Active [ fix ] Already Activated But Shell Is Not Active (in progress) Apr 9, 2026
@kenttonino kenttonino marked this pull request as ready for review April 9, 2026 17:09
@kenttonino kenttonino changed the title [ fix ] Already Activated But Shell Is Not Active (in progress) [ fix ] Already Activated But Shell Is Not Active Apr 9, 2026
@kenttonino kenttonino changed the title [ fix ] Already Activated But Shell Is Not Active [ fix ] Already Activated Message But Shell Is Not Active Apr 9, 2026
@kenttonino kenttonino changed the title [ fix ] Already Activated Message But Shell Is Not Active fix: "already activated" message but shell is not active Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Poetry shell command does not start shell

1 participant