Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/desktop-lite/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "desktop-lite",
"version": "1.2.8",
"version": "1.2.9",
"name": "Light-weight Desktop",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/desktop-lite",
"description": "Adds a lightweight Fluxbox based desktop to the container that can be accessed using a VNC viewer or the web. GUI-based commands executed from the built-in VS code terminal will open on the desktop automatically.",
Expand Down
4 changes: 2 additions & 2 deletions src/desktop-lite/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@ else
fi

# Run whatever was passed in
if [ -n "$1" ]; then
if [ -n "\$1" ]; then
log "Executing \"\$@\"."
exec "$@"
exec "\$@"
else
log "No command provided to execute."
fi
Expand Down
11 changes: 8 additions & 3 deletions test/desktop-lite/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
"noVncVersion": "1.2.0"
}
}
},
},
"test_vnc_resolution_as_container_env_var": {
"image": "ubuntu:noble",
"features": {
"desktop-lite": {}
}
,
},
"containerEnv": {
"VNC_RESOLUTION": "1920x1080x32"
},
Expand All @@ -45,5 +44,11 @@
"features": {
"desktop-lite": {}
}
},
"test_desktop_init_exec_passthrough": {
"image": "ubuntu:noble",
"features": {
"desktop-lite": {}
}
}
}
16 changes: 16 additions & 0 deletions test/desktop-lite/test_desktop_init_exec_passthrough.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

# Optional: Import test library
source dev-container-features-test-lib

# Verify that desktop-init.sh correctly passes through commands.
# Previously, the heredoc in install.sh did not escape $1 and $@, causing them to expand
# to empty strings at install time, so any command passed to desktop-init.sh was silently ignored.

check "command is passed through and executed" \
bash -c "result=\$(/usr/local/share/desktop-init.sh echo 'passthrough-test-token' 2>/dev/null) && echo \"\$result\" | grep -q 'passthrough-test-token'"

# Report result
reportResults
Loading