Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poetry shell: fix nushell #8478

Merged
merged 2 commits into from
Oct 6, 2023
Merged

poetry shell: fix nushell #8478

merged 2 commits into from
Oct 6, 2023

Conversation

dead10ck
Copy link
Contributor

Presently, there are two bugs with poetry shell on nushell:

  1. The overlay use command that poetry sends to the subshell does not get run, but merely appears on the command line as if the user had typed it themselves. Hitting the enter key is still necessary to activate the virtualenv.
  2. In the subshell, whenever the user uses a tool that requires interactive keyboard input, the input is not echoed on the screen. This is because the current code specifically and explicitly turns off the terminal echo mode. It is unclear why.

This change fixes both of these problems by changing the invocation of nu to run the overlay use command with the -e flag, which runs the given command and then starts an interactive shell.

Disabling echo mode is also removed.

src/poetry/utils/shell.py Show resolved Hide resolved
src/poetry/utils/shell.py Outdated Show resolved Hide resolved
@dead10ck
Copy link
Contributor Author

dead10ck commented Oct 5, 2023

Done and done, thanks for the review!

src/poetry/utils/shell.py Outdated Show resolved Hide resolved
dead10ck and others added 2 commits October 6, 2023 17:07
Presently, there are two bugs with `poetry shell` on nushell:

1. The `overlay use` command that poetry sends to the subshell does not
   get run, but merely appears on the command line as if the user had
   typed it themselves. Hitting the enter key is still necessary to
   activate the virtualenv.
2. In the subshell, whenever the user uses a tool that requires
   interactive keyboard input, the input is not echoed on the screen.
   This is because the current code specifically and explicitly turns
   off the terminal echo mode. It is unclear why.

This change fixes both of these problems by changing the invocation of
`nu` to run the `overlay use` command with the `-e` flag, which runs the
given command and then starts an interactive shell.

Disabling echo mode is also removed.
@radoering radoering merged commit ebb91e2 into python-poetry:master Oct 6, 2023
20 checks passed
Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants