Skip to content

Commit

Permalink
common-utils zshrc issue fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prathameshzarkar9 committed Sep 2, 2024
1 parent 6123e41 commit 9391a1e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/common-utils/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,11 @@ if [ "${INSTALL_ZSH}" = "true" ]; then

# Add devcontainer .zshrc template
if [ "$INSTALL_OH_MY_ZSH_CONFIG" = "true" ]; then
echo -e "$(cat "${template_path}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true" > ${user_rc_file}
if [ -f "${template_path}" ] && grep -qF "$(head -n 1 "${template_path}")" "${user_rc_file}"; then
echo "No need to overwrite existing .zshrc file with the template file."
else
echo -e "$(cat "${template_path}")\nDISABLE_AUTO_UPDATE=true\nDISABLE_UPDATE_PROMPT=true" > ${user_rc_file}
fi
sed -i -e 's/ZSH_THEME=.*/ZSH_THEME="devcontainers"/g' ${user_rc_file}
fi

Expand Down

0 comments on commit 9391a1e

Please sign in to comment.