-
Notifications
You must be signed in to change notification settings - Fork 126
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
pulumi cli available only for root #80
Comments
This seems related too #74 which also has a similar root/non-root issue. The solution seems to be to run the actuall installation part of the script as the Docs about sudo -iu "$_REMOTE_USER" <<EOF
# User-specific shell instructions here
curl ... | sh
cat ~/.bashrc
EOF Pulumi download/install instructions (click the "Linux" tab): https://www.pulumi.com/docs/get-started/install/ Looks like it's: curl -fsSL https://get.pulumi.com | sh So, the script can be changed from: if [ "${VERSION}" == "latest" ]; then
curl -fsSL https://get.pulumi.com | $SHELL
else
curl -fsSL https://get.pulumi.com | $SHELL -s -- --version $VERSION
fi To sudo -iu "$_REMOTE_USER" <<EOF
curl -fsSL https://get.pulumi.com | /bin/sh -s -- --version $VERSION
EOF And that MIGHT fix it? TODO for @jcbhmr: Start a PR to address this issue |
Im little torn between using _REMOTE_USER and using a manual script to determine username as beeing used in many official features such as here https://github.com/devcontainers/features/blob/17580ee22f38b3a16e6531a8139629fd2fd8234a/src/common-utils/install.sh#L35 On one hand the _REMOTE_USER is official and guaranteed to work on codespaces, on the other hand the manual method will keep the script more agnostic and decoupled from codespaces/devcontainers in particular (can be used as docker container layer with RUN commands as the old devcontainer library scripts were (https://github.com/microsoft/vscode-dev-containers/tree/main/script-library#arguments) |
@danielbraun89 I think that is a valid concern, but I also think that the
Since there is such strong use even in the official ones, and it seems to be a proposal that is going to be merged, I think it's OK. But that's my opinion based on the current state. Who knows? Maybe we shouldn't use it. |
closed as fixed by #86 |
Thank you for super fast resolution! |
Using a very basic config:
pulumi cli will be only available for the
root
user, not the default UID=1000 user that is logged in by default.The text was updated successfully, but these errors were encountered: