Open AliOsm opened 1 month ago
I think I found something, when I add common-utils
as follows:
"ghcr.io/devcontainers/features/common-utils:latest": {
"installOhMyZsh": false,
"installOhMyZshConfig": false,
"configureZshAsDefaultShell": true
}
IT is not overwriting the .zshrc
file, but enabling OhMyZsh stuff as follows:
"ghcr.io/devcontainers/features/common-utils:latest": {
"installOhMyZsh": true,
"installOhMyZshConfig": true,
"configureZshAsDefaultShell": true
}
Overwrites it. So, I think the bug lives in this snippet.
So, the issue is as follows: in rails/ruby
feature, an rbenv
initialization line is added to the .zshrc
file (ref). When I enable OhMyZsh, .zshrc
file changes to OhMyZsh template and the initialization line disappears, so I need to add the following to my post create script in my DevContainer setup to add the initialization again:
echo 'eval "$(rbenv init -)"' >> /home/vscode/.zshrc
eval "$(rbenv init -)"
Hi 👋
Thanks for reporting!
@gauravsaini04 / @prathameshzarkar9 Can either of you look into fixing the bug?
Hi @samruddhikhandale ,
I have created a PR to fix this issue: PR 1069 Kindly review the same
Hi @samruddhikhandale , PR is updated and the test cases in the pipeline are now succeed. Kindly review the PR once.
Closing as fixed with https://github.com/devcontainers/features/pull/1069. Feel free to reopen if needed, thanks!
I think the changes to resolve this has broken devcontainers using ghcr.io/devcontainers/features/node:1
. node
& npm
are not found after building the container
I have had to specify ghcr.io/devcontainers/features/common-utils:2.4.5
to get it building with node
& npm
again.
Thanks for letting us know, I have reverted the changes. See https://github.com/devcontainers/features/pull/1094
@prathameshzarkar9 Can you take a look at the issue and merge the changes with the fix?
I'm using
rails/ruby
image, which already usescommon-utils
. But I want to override some options like making Zsh the default shell and install OhMyZsh. When I add:To my
devcontainer.json
, thiscommon-utils
usage overwrites the.zshrc
coming fromrails/ruby
image, which should not happen based on thiscommon-utils
script.Any thoughts why this could happen?