Skip to content

impl: set SHELL environment variable #1512

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

Merged
merged 1 commit into from
Sep 29, 2023
Merged

impl: set SHELL environment variable #1512

merged 1 commit into from
Sep 29, 2023

Conversation

gcurtis
Copy link
Collaborator

@gcurtis gcurtis commented Sep 28, 2023

We were assuming that most shells set SHELL upon startup, but this is only true for bash. Usually SHELL is only set by login, so we need to set it ourselves when launching the user's shell.

Also remove the keyEqualsValue which was only being used by the VSCode integration. This function escapes environment variable values for a shell, but we were setting the code process's environment with them directly. This was mangling the values by adding quotes and backslashes.

Fixes #1454.

We were assuming that most shells set `SHELL` upon startup, but this is
only true for bash. Usually `SHELL` is only set by `login`, so we need
to set it ourselves when launching the user's shell.

Also remove the `keyEqualsValue` which was only being used by the VSCode
integration. This function escapes environment variable values for a
shell, but we were setting the `code` process's environment with them
directly. This was mangling the values by adding quotes and
backslashes.

Fixes #1454.
@gcurtis gcurtis requested a review from mohsenari September 28, 2023 21:02
Copy link
Collaborator

@mohsenari mohsenari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested reopening vscode. It works ok 👍

@gcurtis
Copy link
Collaborator Author

gcurtis commented Sep 29, 2023

@mohsenari thanks for confirming.

@gcurtis gcurtis merged commit 633f755 into main Sep 29, 2023
@gcurtis gcurtis deleted the gcurtis/set-shell branch September 29, 2023 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Package Issue Report]: poetry
2 participants