From 3ea4d6bbd7864bcf7b5a91fdeeb66e4f5a6f46c0 Mon Sep 17 00:00:00 2001 From: Josh Spicer Date: Thu, 7 Dec 2023 10:49:18 -0800 Subject: Fix `.zprofile` is owned by root (#775) * revert behavior of sourcing .profile in .zprofile https://github.com/devcontainers/features/pull/736/files#diff-3e71c0a0669a0410f7dd0d8f2b83f3b6bf6b525d3eabd354f19f32822da669fcR460-R463 * add test * increment version * create empty .zprofile is not present, and fix test * temporarily add back .profile to .zprofile (only if file did not exist) --- test/common-utils/configure_zsh_as_default_shell.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/common-utils/configure_zsh_as_default_shell.sh b/test/common-utils/configure_zsh_as_default_shell.sh index 01d1522..21b1210 100644 --- a/test/common-utils/configure_zsh_as_default_shell.sh +++ b/test/common-utils/configure_zsh_as_default_shell.sh @@ -11,5 +11,7 @@ check "default-shell-is-zsh" bash -c "getent passwd $(whoami) | awk -F: '{ print check "default-zshrc-is-dev-container-template" bash -c "cat ~/.zshrc | grep ZSH_THEME | grep devcontainers" check "zsh-path-contains-local-bin" zsh -l -c "echo $PATH | grep '/home/devcontainer/.local/bin'" +check "Ensure .zprofile is owned by remoteUser" bash -c "stat -c '%U' /home/devcontainer/.zprofile | grep devcontainer" + # Report result reportResults -- cgit v1.2.3