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

platform self:install doesn't properly detect shell #117

Closed
hanoii opened this issue Sep 20, 2023 · 3 comments
Closed

platform self:install doesn't properly detect shell #117

hanoii opened this issue Sep 20, 2023 · 3 comments

Comments

@hanoii
Copy link

hanoii commented Sep 20, 2023

I think the issue is that the platform doesn't get the SHELL env var properly or populate within the child process or the like:

I am inside a ddev container:

$ echo $SHELL
/bin/bash
$ platform self:install
...
Setting up autocompletion... skipped (unsupported shell)
...
$ SHELL=$SHELL platform self:install -vvv
...
DEBUG Detected shell type: bash
Setting up autocompletion...# Running subcommand: _completion --generate-hook=1 --program=platform --shell-type=bash
 done
...
@hanoii hanoii changed the title platform self:install not doesn't detect shell platform self:install doesn't properly detect shell Sep 20, 2023
@pjcdawkins
Copy link
Contributor

Hm, @akalipetis I thought we were sending the entire environment to the child process like this -

cmd.Env = append(cmd.Env, os.Environ()...)

@akalipetis
Copy link
Member

Yes, we do. That's quite strange and needs a bit of debugging, maybe the way os.Environ() works is not the one we believe? 😕

@hanoii
Copy link
Author

hanoii commented Mar 26, 2024

This is not an issue on platform cli, see ddev/ddev#6018.

@hanoii hanoii closed this as completed Mar 26, 2024
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

No branches or pull requests

3 participants