Skip to content

Commit ee80d1f

Browse files
authored
Fix nodejs: Create directory before executing script (coder#183)
1 parent 017f007 commit ee80d1f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

nodejs/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ variable "nvm_version" {
2222

2323
variable "nvm_install_prefix" {
2424
type = string
25-
description = "The prefix to install nvm to."
26-
default = "$HOME/.nvm"
25+
description = "The prefix to install nvm to (relative to $HOME)."
26+
default = ".nvm"
2727
}
2828

2929
variable "node_versions" {

nodejs/run.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ RESET='\033[0m'
1010

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

13-
export NVM_DIR="$${INSTALL_PREFIX}/nvm"
13+
export NVM_DIR="$HOME/$${INSTALL_PREFIX}/nvm"
14+
mkdir -p "$NVM_DIR"
1415

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

0 commit comments

Comments
 (0)