Install node using volta

This commit is contained in:
T. R. Bernstein
2025-10-17 08:04:35 +02:00
parent 3f2f23a446
commit 1953b01148
2 changed files with 8 additions and 3 deletions

View File

@@ -138,7 +138,7 @@ function getHomebrewDirectoryPath() {
print -- ${homebrew_prefix:-$(getDefaultHomebrewPrefix)}/Homebrew
}
function configure_folders() {
function configureFolders() {
local dirPath
for dirPath in ${HOME}/bin ${HOME}/.vim/{backups,swaps}; do
[[ ! -d ${dirPath} ]] && indicateActivity -- "Creating ${dirPath}" mkdir ${dirPath}
@@ -146,10 +146,15 @@ function configure_folders() {
indicateActivity -- 'Hide folders' hideFolders
}
function installNode() {
volta install node
}
function main() {
lop -y h1 -- -i 'Setup User'
[[ $(id -u) -eq 0 ]] && { loptty -- -e 'Command must not be run as root.' -e $dirPath; return 16 }
configure_folders
configureFolders
indicateActivity -- 'Install node' installNode
local homebrew_prefix=`getDefaultHomebrewPrefix`
local homebrew_directory=`getHomebrewDirectoryPath`
checkExecPrerequisites || return 17