Skip to content

Commit 28ca71a

Browse files
Revert "common-utils overwrites .zshrc coming from image built" (#1094)
* Revert "common-utils overwrites .zshrc coming from image built (#1069)" This reverts commit 56233fd. * Update devcontainer-feature.json
1 parent b2c7d17 commit 28ca71a

File tree

6 files changed

+3
-45
lines changed

6 files changed

+3
-45
lines changed

src/common-utils/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "common-utils",
3-
"version": "2.4.6",
3+
"version": "2.4.7",
44
"name": "Common Utilities",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
66
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",

src/common-utils/main.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then
491491
echo 'source $HOME/.profile' >> "${user_home}/.zprofile" # TODO: Reconsider adding '.profile' to '.zprofile'
492492
chown ${USERNAME}:${group_name} "${user_home}/.zprofile"
493493
fi
494+
494495
if [ "${ZSH_ALREADY_INSTALLED}" != "true" ]; then
495496
if [ "${ADJUSTED_ID}" = "rhel" ]; then
496497
global_rc_path="/etc/zshrc"
@@ -542,8 +543,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then
542543

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

test/common-utils/devcontainer-ruby-zshrc.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/common-utils/devcontainer-ruby-zshrc/Dockerfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/common-utils/devcontainer-ruby-zshrc/meta.env

Lines changed: 0 additions & 8 deletions
This file was deleted.

test/common-utils/scenarios.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -235,24 +235,6 @@
235235
}
236236
}
237237
},
238-
"devcontainer-ruby-zshrc": {
239-
"build": {
240-
"dockerfile": "Dockerfile"
241-
},
242-
"remoteUser": "vscode",
243-
"features": {
244-
"common-utils": {
245-
"installZsh": true,
246-
"username": "vscode",
247-
"userUid": "1000",
248-
"userGid": "1000",
249-
"upgradePackages": true,
250-
"installOhMyZsh": true,
251-
"installOhMyZshConfig": true,
252-
"configureZshAsDefaultShell": true
253-
}
254-
}
255-
},
256238
"alpine-base-zsh-default": {
257239
"image": "mcr.microsoft.com/devcontainers/base:alpine",
258240
"remoteUser": "vscode",

0 commit comments

Comments
 (0)