Fix nodejs: Create directory before executing script (#183)
This commit is contained in:
@@ -22,8 +22,8 @@ variable "nvm_version" {
|
|||||||
|
|
||||||
variable "nvm_install_prefix" {
|
variable "nvm_install_prefix" {
|
||||||
type = string
|
type = string
|
||||||
description = "The prefix to install nvm to."
|
description = "The prefix to install nvm to (relative to $HOME)."
|
||||||
default = "$HOME/.nvm"
|
default = ".nvm"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "node_versions" {
|
variable "node_versions" {
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ RESET='\033[0m'
|
|||||||
|
|
||||||
printf "$${BOLD}Installing nvm!$${RESET}\n"
|
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)"
|
script="$(curl -sS -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$${NVM_VERSION}/install.sh" 2>&1)"
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user