Skip to content

Commit 958e24b

Browse files
committed
Fixed broken assumption
1 parent 563726d commit 958e24b

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/jetify-devbox/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Devbox",
33
"id": "jetify-devbox",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"description": "Instant, easy, and predictable development environments using Jetify Devbox",
66
"documentationURL": "https://github.com/righteouslabs/devcontainer-jetify-devbox",
77
"dependsOn": {

src/jetify-devbox/install.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ exec 2>&1
4747
4848
echo "Running Devbox post-installation setup..."
4949
50+
# Use the current directory as the default workspace folder
51+
WORKSPACE_DIR="${WORKSPACE_FOLDER:-$(pwd)}"
52+
5053
# Check if devbox.json exists in workspace
51-
if [ -f "${WORKSPACE_FOLDER:-/workspaces/*}/devbox.json" ]; then
52-
echo "Found devbox.json, running devbox update..."
53-
cd "${WORKSPACE_FOLDER:-/workspaces/*}"
54+
if [ -f "${WORKSPACE_DIR}/devbox.json" ]; then
55+
echo "Found devbox.json in ${WORKSPACE_DIR}, running devbox update..."
56+
cd "${WORKSPACE_DIR}"
5457
5558
# Run as the remote user if not root
5659
if [ "${_REMOTE_USER}" != "root" ]; then
@@ -78,11 +81,10 @@ set -e
7881
echo "Running manual Devbox setup..."
7982
8083
# Check if devbox.json exists in workspace
81-
if [ -f "${WORKSPACE_FOLDER:-/workspaces/*}/devbox.json" ]; then
84+
if [ -f "devbox.json" ]; then
8285
echo "Found devbox.json, running devbox update..."
83-
cd "${WORKSPACE_FOLDER:-/workspaces/*}"
8486
devbox update
85-
87+
8688
# Also set up the shell environment for VS Code processes
8789
devbox shellenv --init-hook >> ~/.profile
8890
echo "Devbox setup completed successfully"

0 commit comments

Comments
 (0)