From 651fb0ea369c602d6cb1a0405a38907cae98264a Mon Sep 17 00:00:00 2001 From: Mathiyarasy <157102811+Mathiyarasy@users.noreply.github.com> Date: Thu, 9 Apr 2026 12:59:35 +0000 Subject: [PATCH 1/2] update script --- src/desktop-lite/install.sh | 4 ++-- test/desktop-lite/scenarios.json | 11 ++++++++--- .../test_desktop_init_exec_passthrough.sh | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 test/desktop-lite/test_desktop_init_exec_passthrough.sh diff --git a/src/desktop-lite/install.sh b/src/desktop-lite/install.sh index 4575cc4f9..822818723 100755 --- a/src/desktop-lite/install.sh +++ b/src/desktop-lite/install.sh @@ -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 diff --git a/test/desktop-lite/scenarios.json b/test/desktop-lite/scenarios.json index 4ee429dd5..f8719acc6 100644 --- a/test/desktop-lite/scenarios.json +++ b/test/desktop-lite/scenarios.json @@ -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" }, @@ -45,5 +44,11 @@ "features": { "desktop-lite": {} } + }, + "test_desktop_init_exec_passthrough": { + "image": "ubuntu:noble", + "features": { + "desktop-lite": {} + } } } \ No newline at end of file diff --git a/test/desktop-lite/test_desktop_init_exec_passthrough.sh b/test/desktop-lite/test_desktop_init_exec_passthrough.sh new file mode 100644 index 000000000..27d224ca3 --- /dev/null +++ b/test/desktop-lite/test_desktop_init_exec_passthrough.sh @@ -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 From 5b67eacea556e978f19372fc990d475c0eac6b31 Mon Sep 17 00:00:00 2001 From: Mathiyarasy <157102811+Mathiyarasy@users.noreply.github.com> Date: Tue, 14 Apr 2026 08:28:40 +0000 Subject: [PATCH 2/2] update minor version --- src/desktop-lite/devcontainer-feature.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/desktop-lite/devcontainer-feature.json b/src/desktop-lite/devcontainer-feature.json index ae10c9977..b87e2bc02 100644 --- a/src/desktop-lite/devcontainer-feature.json +++ b/src/desktop-lite/devcontainer-feature.json @@ -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.",