Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit 249d7f0

Browse files
cbbm142John Pastore
andauthored
Fixed bad conditional, fixed nvm install for lts (#988)
Updated nvm commands to install a specific version, or lts properly. Co-authored-by: John Pastore <[email protected]>
1 parent ae54402 commit 249d7f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

containers/go/.devcontainer/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
44

55
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
66
ARG NODE_VERSION="none"
7-
RUN if [ "${NODE_VERSION}" = "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
7+
RUN if [ "${NODE_VERSION}" = "lts" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install --lts 2>&1"; \
8+
elif [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; \
9+
fi
810

911
# [Optional] Uncomment this section to install additional OS packages.
1012
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

0 commit comments

Comments
 (0)