Skip to content

Commit 6c07263

Browse files
committed
Use $HOME instead of hardcoded /home/vscode in Bun PATH fix
More portable if remoteUser changes. The single-quoted heredoc preserves $HOME for expansion at source-time, which is the standard pattern for /etc/profile.d/ scripts.
1 parent 29007f5 commit 6c07263

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.devcontainer/scripts/setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ if [ "$SETUP_POSTSTART" = "true" ]; then
163163
fi
164164

165165
# Fix Bun PATH — external feature only adds to ~/.bashrc (misses non-interactive shells)
166-
if [ -d "/home/vscode/.bun/bin" ] && [ ! -f /etc/profile.d/bun.sh ]; then
166+
if [ -d "$HOME/.bun/bin" ] && [ ! -f /etc/profile.d/bun.sh ]; then
167167
sudo tee /etc/profile.d/bun.sh > /dev/null <<'BUNEOF'
168-
export BUN_INSTALL="/home/vscode/.bun"
168+
export BUN_INSTALL="$HOME/.bun"
169169
case ":${PATH}:" in
170170
*:"${BUN_INSTALL}/bin":*) ;;
171171
*) export PATH="${BUN_INSTALL}/bin:${PATH}" ;;

0 commit comments

Comments
 (0)