Unverified Commit 849a5e2a authored by Danilo Hoffmann's avatar Danilo Hoffmann Committed by GitHub

[common-utils] use new ohmyzsh setting to disable auto update (#1424)

* Use new config to disable OhMyZsh auto update

There's a new method:
https://github.com/ohmyzsh/ohmyzsh/wiki/Settings#deprecated-settings

* bump patch version

* Remove `buster` from testing scenarios as it is EOL

---------
Co-authored-by: 's avatarÁlvaro Rausell Guiard <33221237+AlvaroRausell@users.noreply.github.com>
parent b9c09c4d
{ {
"id": "common-utils", "id": "common-utils",
"version": "2.5.3", "version": "2.5.4",
"name": "Common Utilities", "name": "Common Utilities",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils", "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.", "description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
......
...@@ -558,7 +558,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then ...@@ -558,7 +558,7 @@ if [ "${INSTALL_ZSH}" = "true" ]; then
# Add devcontainer .zshrc template # Add devcontainer .zshrc template
if [ "$INSTALL_OH_MY_ZSH_CONFIG" = "true" ]; then if [ "$INSTALL_OH_MY_ZSH_CONFIG" = "true" ]; then
if ! [ -f "${template_path}" ] || ! grep -qF "$(head -n 1 "${template_path}")" "${user_rc_file}"; then if ! [ -f "${template_path}" ] || ! grep -qF "$(head -n 1 "${template_path}")" "${user_rc_file}"; then
echo -e "$(cat "${template_path}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true" > ${user_rc_file} echo -e "$(cat "${template_path}")\nzstyle ':omz:update' mode disabled" > ${user_rc_file}
fi fi
sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="devcontainers"/g' ${user_rc_file} sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="devcontainers"/g' ${user_rc_file}
fi fi
......
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Definition specific tests
. /etc/os-release
check "non-root user" test "$(whoami)" = "devcontainer"
check "distro" test "${VERSION_CODENAME}" = "buster"
# Report result
reportResults
\ No newline at end of file
...@@ -13,13 +13,6 @@ ...@@ -13,13 +13,6 @@
"common-utils": {} "common-utils": {}
} }
}, },
"buster": {
"image": "debian:buster",
"remoteUser": "devcontainer",
"features": {
"common-utils": {}
}
},
"bullseye": { "bullseye": {
"image": "debian:bullseye", "image": "debian:bullseye",
"remoteUser": "devcontainer", "remoteUser": "devcontainer",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment