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

shell-history not working with Python virtual environments on Debian Bookworm #13

Open
juls opened this issue Oct 14, 2023 · 1 comment · May be fixed by #14
Open

shell-history not working with Python virtual environments on Debian Bookworm #13

juls opened this issue Oct 14, 2023 · 1 comment · May be fixed by #14

Comments

@juls
Copy link

juls commented Oct 14, 2023

(At least) for zsh and bash, this line breaks with Pythons virtual environments on Debian Bookworm.

To reproduce,

  • create a new Dev Container at .devcontainer/devcontainer.json with
{
	"name": "Python 3",
	"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bookworm",
	"features": {
		"ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
	}
}
  • open the Dev Container and Create a Python environment as described here
  • Open a new shell in the terminal window and you'll see
source /workspaces/python-test/.venv/bin/activate
source /workspaces/python-test/.venv/bin/activate
vscode ➜ /workspaces/python-test $

with no activated environment.

  • if you switch to :1-3.11-bullseye as the image source, it works (after a Python:Select Interpreter from the Command Palette):
source /workspaces/python-test/.venv/bin/activate
vscode ➜ /workspaces/python-test $ source /workspaces/python-test/.venv/bin/activate
(.venv) vscode ➜ /workspaces/python-test $ 

If you switch back to 1-3.11-bookworm it won't work again unless you delete the line mentioned above.

@juls juls linked a pull request Oct 30, 2023 that will close this issue
@juls
Copy link
Author

juls commented Oct 30, 2023

@stuartleeks I saw that you also addressed this issue in 61fb446 but then reverted the fix; by changing owner of /dc/shellhistory during installation (while root) there should be no need to chown at login anymore.

I've only tested this for bash and zsh.

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 a pull request may close this issue.

1 participant