Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Fix nodejs: Create directory before executing script #183

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nodejs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ variable "nvm_version" {

variable "nvm_install_prefix" {
type = string
description = "The prefix to install nvm to."
default = "$HOME/.nvm"
description = "The prefix to install nvm to (relative to $HOME)."
default = ".nvm"
}

variable "node_versions" {
Expand Down
3 changes: 2 additions & 1 deletion nodejs/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ RESET='\033[0m'

printf "$${BOLD}Installing nvm!$${RESET}\n"

export NVM_DIR="$${INSTALL_PREFIX}/nvm"
export NVM_DIR="$HOME/$${INSTALL_PREFIX}/nvm"
mkdir -p "$NVM_DIR"

script="$(curl -sS -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$${NVM_VERSION}/install.sh" 2>&1)"
if [ $? -ne 0 ]; then
Expand Down