Skip to content

Commit 100544a

Browse files
committed
chore: Add asdf shims to devcontainer path
1 parent e3df2c3 commit 100544a

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,5 +81,8 @@
8181
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
8282
],
8383
"name": "Devcontainer",
84-
"postCreateCommand": "zsh scripts/devcontainer/postcreatecommand.sh"
84+
"postCreateCommand": "zsh scripts/devcontainer/postcreatecommand.sh",
85+
"remoteEnv": {
86+
"PATH": "/home/vscode/.asdf/shims:/home/vscode/.asdf/bin:${PATH}"
87+
}
8588
}

scripts/devcontainer/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ RUN echo 'CURL_CA_BUNDLE="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
4242
RUN echo 'GIT_SSL_CAINFO="/etc/ssl/certs/ca-certificates.crt"' >> ~/.zshrc
4343

4444
# Add Go environment to shell
45-
RUN echo 'export GOPATH="/home/vscode/go"' >> ~/.zshrc
46-
RUN echo 'export PATH="/go/bin:$GOPATH/bin:$PATH"' >> ~/.zshrc
45+
RUN echo 'GOPATH="/home/vscode/go"' >> ~/.zshrc
46+
RUN echo 'PATH="/home/vscode/.asdf/shims:/go/bin:$GOPATH/bin:$PATH"' >> ~/.zshrc

scripts/devcontainer/postcreatecommand.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
echo 'export GPG_TTY=$TTY' | cat - ~/.zshrc > temp && mv temp ~/.zshrc
44

5-
echo 'export PATH="$HOME/go/bin:/usr/local/go/bin:$PATH"' >> ~/.zshrc
6-
echo 'export PATH="$HOME/.asdf/shims:$PATH"' >> ~/.zshrc
75
echo 'eval "$(asdf completion zsh)"' >> ~/.zshrc
86
source ~/.zshrc
97

0 commit comments

Comments
 (0)