Skip to content

Commit 491731a

Browse files
committed
Fixes to testing
1 parent 4ac857a commit 491731a

File tree

5 files changed

+34
-12
lines changed

5 files changed

+34
-12
lines changed

src/jetify-devbox/ReadMe.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
# Initialize DevBox Shell
2-
3-
Docs: [Devbox](https://www.jetify.com/docs/devbox/)
4-
1+
2+
# Devbox (jetify-devbox)
3+
4+
Instant, easy, and predictable development environments using Jetify Devbox
5+
6+
## Example Usage
7+
8+
```json
9+
"features": {
10+
"ghcr.io/righteouslabs/devcontainer-jetify-devbox/jetify-devbox:1": {}
11+
}
12+
```
13+
14+
## Options
15+
16+
| Options Id | Description | Type | Default Value |
17+
|-----|-----|-----|-----|
18+
| autoUpdate | Automatically run 'devbox update' after container creation | boolean | true |
19+
20+
21+
22+
---
23+
24+
_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/righteouslabs/devcontainer-jetify-devbox/blob/main/src/jetify-devbox/devcontainer-feature.json). Add additional notes to a `NOTES.md`._

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.1",
4+
"version": "1.0.2",
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: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,8 @@ if [ -f "${WORKSPACE_DIR}/devbox.json" ]; then
5555
echo "Found devbox.json in ${WORKSPACE_DIR}, running devbox update..."
5656
cd "${WORKSPACE_DIR}"
5757
58-
# Run as the remote user if not root
59-
if [ "${_REMOTE_USER}" != "root" ]; then
60-
su ${_REMOTE_USER} -c 'devbox update'
61-
else
62-
devbox update
63-
fi
58+
# Run devbox update
59+
devbox update
6460
6561
# Also set up the shell environment for VS Code processes
6662
devbox shellenv --init-hook >> ~/.profile

test/jetify-devbox/test_auto_update_enabled.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -e
66

77
source dev-container-features-test-lib
88

9-
# Create devbox.json to simulate the onCreateCommand
9+
# Create devbox.json before running the post-setup script
1010
cat > devbox.json << 'EOF'
1111
{
1212
"packages": [
@@ -22,6 +22,9 @@ cat > devbox.json << 'EOF'
2222
}
2323
EOF
2424

25+
# Run the post-setup script manually to test the auto-update functionality
26+
/usr/local/share/devbox-post-setup.sh
27+
2528
# Check that the post-setup script was created
2629
check "post-setup script exists" test -f /usr/local/share/devbox-post-setup.sh
2730

test/jetify-devbox/test_vscode_integration.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ cat > devbox.json << 'EOF'
2222
}
2323
EOF
2424

25+
# Run the post-setup script to process the devbox.json
26+
/usr/local/share/devbox-post-setup.sh
27+
2528
# Check devbox was installed
2629
check "devbox installed" devbox version
2730

0 commit comments

Comments
 (0)