Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(agent/usershell): check shell on darwin via dscl #8366

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 2 commits into from
Jul 11, 2023

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Jul 7, 2023

This PR makes it so that we check the user configured shell via dscl on macOS. This should be more reliable than expecting the presence of the SHELL env variable. This requires a valid user to exist at /Users/username though (which is usually the case with all things macOS).

Thought: We might want to introduce some fallbacks to this in the future. macOS could fallback to /bin/zsh and Linux to /bin/sh, for instance.

Fixes https://github.com/coder/v2-customers/issues/224

@mafredri mafredri force-pushed the mafredri/fix-darwin-usershell branch 11 times, most recently from c48681e to 48e1cb4 Compare July 7, 2023 12:54
@mafredri mafredri force-pushed the mafredri/fix-darwin-usershell branch from 48e1cb4 to 39a9bab Compare July 7, 2023 12:58
@mafredri mafredri marked this pull request as ready for review July 7, 2023 13:03
@mafredri mafredri requested review from kylecarbs and johnstcn July 7, 2023 13:03
@mafredri mafredri merged commit e508d9a into main Jul 11, 2023
@mafredri mafredri deleted the mafredri/fix-darwin-usershell branch July 11, 2023 17:27
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2023
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.

3 participants