mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-13 07:31:51 +00:00
Update install.sh
This commit is contained in:
parent
27b84d69ea
commit
2626807234
14
install.sh
14
install.sh
@ -511,19 +511,23 @@ EOF
|
|||||||
case "$SHELL" in
|
case "$SHELL" in
|
||||||
*/bash)
|
*/bash)
|
||||||
CONFIG_FILE="$HOME/.bashrc"
|
CONFIG_FILE="$HOME/.bashrc"
|
||||||
|
BASH_OR_ZSH=true
|
||||||
|
append_to_file "$CONFIG_FILE" "$CODE"
|
||||||
;;
|
;;
|
||||||
*/zsh)
|
*/zsh)
|
||||||
CONFIG_FILE="$HOME/.zshrc"
|
CONFIG_FILE="$HOME/.zshrc"
|
||||||
|
BASH_OR_ZSH=true
|
||||||
|
append_to_file "$CONFIG_FILE" "$CODE"
|
||||||
|
;;
|
||||||
|
*/ash)
|
||||||
|
CONFIG_FILE="$HOME/.profile" # or another appropriate file for ash
|
||||||
|
append_to_file "$CONFIG_FILE" "$CODE"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported shell: $SHELL"
|
echo "Unsupported shell to add node version to the shell: $SHELL"
|
||||||
exit 1
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Append the code to the appropriate configuration file
|
|
||||||
append_to_file "$CONFIG_FILE" "$CODE"
|
|
||||||
|
|
||||||
# Source nvm
|
# Source nvm
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
. "$(nvm_install_dir)/nvm.sh"
|
. "$(nvm_install_dir)/nvm.sh"
|
||||||
|
Loading…
Reference in New Issue
Block a user