Skip to content

Commit

Permalink
Revert "common-utils overwrites .zshrc coming from image built" (#1094)
Browse files Browse the repository at this point in the history
* Revert "common-utils overwrites .zshrc coming from image built (#1069)"

This reverts commit 56233fd.

* Update devcontainer-feature.json
  • Loading branch information
samruddhikhandale authored Aug 15, 2024
1 parent b2c7d17 commit 28ca71a
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/common-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "common-utils",
"version": "2.4.6",
"version": "2.4.7",
"name": "Common Utilities",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
Expand Down
4 changes: 2 additions & 2 deletions src/common-utils/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then
echo 'source $HOME/.profile' >> "${user_home}/.zprofile" # TODO: Reconsider adding '.profile' to '.zprofile'
chown ${USERNAME}:${group_name} "${user_home}/.zprofile"
fi

if [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then
if [ "${ADJUSTED_ID}" = "rhel" ]; then
global_rc_path="/etc/zshrc"
Expand Down Expand Up @@ -542,8 +543,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then

# Add devcontainer .zshrc template
if [ "$INSTALL_OH_MY_ZSH_CONFIG" = "true" ]; then
template_code="$(cat "${template_path}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true"
echo -e "$([ -f "${user_rc_file}" ] && cat "${user_rc_file}")\n${template_code}" > "${user_rc_file}"
echo -e "$(cat "${template_path}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true" > ${user_rc_file}
sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="devcontainers"/g' ${user_rc_file}
fi

Expand Down
12 changes: 0 additions & 12 deletions test/common-utils/devcontainer-ruby-zshrc.sh

This file was deleted.

4 changes: 0 additions & 4 deletions test/common-utils/devcontainer-ruby-zshrc/Dockerfile

This file was deleted.

8 changes: 0 additions & 8 deletions test/common-utils/devcontainer-ruby-zshrc/meta.env

This file was deleted.

18 changes: 0 additions & 18 deletions test/common-utils/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,24 +235,6 @@
}
}
},
"devcontainer-ruby-zshrc": {
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "vscode",
"features": {
"common-utils": {
"installZsh": true,
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": true,
"installOhMyZsh": true,
"installOhMyZshConfig": true,
"configureZshAsDefaultShell": true
}
}
},
"alpine-base-zsh-default": {
"image": "mcr.microsoft.com/devcontainers/base:alpine",
"remoteUser": "vscode",
Expand Down

0 comments on commit 28ca71a

Please sign in to comment.