vscode-dev-containers
vscode-dev-containers copied to clipboard
Issue 704: Adding enabling and disabling of RBENV and RVM packages
Work Item ID
Description
Allows for RBENV and RVM tools to be enabled or disabled in the Ruby dev container.
PR Checklist
Use the check-list below to ensure your branch is ready for PR. If the item is not applicable, leave it blank.
- [X] I have updated the documentation accordingly.
- [X] I have added tests to cover my changes.
- [X] All new and existing tests passed.
- [X] My code follows the code style of this project.
- [X] I ran the lint checks which produced no new errors nor warnings for my changes.
- [X] I have checked to ensure there aren't other open Pull Requests for the same update/change.
Does this introduce a breaking change?
- [ ] Yes
- [X] No
If this introduces a breaking change, please describe the impact and migration path for existing applications below.
Testing
- Instructions for testing and validation of your code: All smoke testing is done in the CI pipeline of the VS Code Remote Containers Repository. A sample run can be found here: https://github.com/microsoft/vscode-dev-containers/runs/5378725362?check_suite_focus=true
Other information or known dependencies
PR has been reviewed and approved internally by @juzuluag , @bderusha and @dnastrain
- Any other information or known dependencies that is important to this PR.
- Changes to
ruby-debian.shscript that modifies thebashrcandzshrcfiles in a devcontainer to allow conditional enabling ofrbenvandrvm. - Changes to
devcontainer.jsonto include two new ENV Variables for built containers:RBENV_ENABLEDandRVM_ENABLEDwhich are read by thebashrcandzshrcto enable/disable RBENV and RVM - Default enables
rbenvandrvminbase.Dockerfilein order to reduce workflow disruption. - Default disables
rbenvandrvmindevcontainer.jsonin order to reduce tooling overhead for devcontainer users.
So reviewing this - the changes look good... but one thing that is flummoxing me is it still seems like somehow rvm is getting sourced when I set "RVM_ENABLED":"false" Are you seeing that as well? I am seeing rbenv not be found as expected - it's just rvm.
Ah - found it. It looks like rvm is installing a file at /etc/profile.d/rvm.sh that we didn't expect. This is getting picked up when VS Code starts rather than when a new terminal is created.
I suspect this will need to have the same condition added to it.
Ah - found it. It looks like rvm is installing a file at
/etc/profile.d/rvm.shthat we didn't expect. This is getting picked up when VS Code starts rather than when a new terminal is created.I suspect this will need to have the same condition added to it.
I'm not sure exactly how this works. Do you mean modifying the rvm.sh file directly, or do you mean maybe having the .bashrc file delete the rvm.sh file in profile.d?
@KanishkT123 Yeah, that is a reasonable way to handle it I think. I don't think this originally happened but got added somewhere along the way by the rvm installer.