Skip to content

Commit

Permalink
Uncompress the nodejs archive
Browse files Browse the repository at this point in the history
Ensure that we uncompress the downloaded archive

Signed-off-by: Aidan Delaney <[email protected]>
  • Loading branch information
AidanDelaney committed Nov 3, 2023
1 parent f9872a5 commit 8f0deca
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Next, we'll download the NodeJS runtime and install it into the layer directory.
```bash
echo "---> Downloading and extracting NodeJS"
node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "${node_js_url}" | tar -xf - -C "${node_js_layer}"
wget -q -O - "${node_js_url}" | tar -xzf - -C "${node_js_layer}"
```

This code uses the `wget` tool to download the NodeJS binaries from the given URL, and extracts it to the `node_js_layer` directory.
Expand Down Expand Up @@ -74,7 +74,7 @@ mkdir -p "${node_js_layer}"
# 3. DOWNLOAD node-js
echo "---> Downloading and extracting NodeJS"
node_js_url=https://nodejs.org/dist/v18.18.1/node-v18.18.1-linux-x64.tar.xz
wget -q -O - "${node_js_url}" | tar -xf - -C "${node_js_layer}"
wget -q -O - "${node_js_url}" | tar -xzf - -C "${node_js_layer}"

# 4. MAKE node-js AVAILABLE DURING LAUNCH
echo -e '[types]\nlaunch = true' > "${layersdir}/node-js.toml"
Expand Down

0 comments on commit 8f0deca

Please sign in to comment.