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

Some features edit .bashrc and .zshrc, such as [stuartleeks/shell-history](https://github.com/stuartleeks/dev-container-features/blob/main/src/shell-history/README.md) which needs to chown a folder that is mounted. #374

Open
bgu5678 opened this issue Jan 9, 2024 · 1 comment

Comments

@bgu5678
Copy link

bgu5678 commented Jan 9, 2024

Some features edit .bashrc and .zshrc, such as stuartleeks/shell-history which needs to chown a folder that is mounted.

The issue I'm experiencing comes when I use my custom dotfiles repo, which replaces any .zshrc files with a custom one, so any changes made from features are basically deleted.

Do you have any idea on how to fix this? I could source the old .zshrc in my custom file, but I'm not sure if that's a good idea. I was also thinking that there can be a "best practice" for devcontainer features to add stuff to .zshrc.devcontainers (and so on for bash and fish) so people can take this into account when making install scripts for devcontainer dotfiles.

Originally posted by @joshuanianji in #371

@joshuanianji
Copy link

joshuanianji commented Jan 9, 2024

Thanks for posting this @bgu5678, although I don't think this is an issue with the spec so this can be closed. The solution is probably to chown the folder during a lifecycle script (see: joshuanianji/devcontainer-features#40). I'll first have test it with my features and see how it goes though!

If it works well, I might send a PR to a couple other features with volume mounts.

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

2 participants