🐛 (install.sh): Fix shell change command to use sudo and specify $USER

💡 (install.sh): Update error message for clarity when shell change fails
This commit is contained in:
Frank Qing
2024-09-06 16:31:31 +08:00
parent 3c8f666e72
commit e74202be06

View File

@@ -245,12 +245,11 @@ else
# source ~/.zshrc
echo -e "\nSudo access is needed to change default shell\n"
if chsh -s $(which zsh) && /bin/zsh -i -c 'omz update'; then
if sudo chsh -s $(which zsh) $USER && /bin/zsh -i -c 'omz update'; then
echo -e "Installation complete, exit terminal and enter a new zsh session"
echo -e "In a new zsh session manually run: build-fzf-tab-module"
else
echo -e "Something is wrong"
echo -e "Something went wrong"
fi
fi
exit