Skip to content

Commit 342a256

Browse files
committed
fix: add x-launch-check support and --no-sandbox for goose electron launch
Electron apps crash with FATAL when run as root without --no-sandbox. Add x-launch-check field support to the launch check step so per-app args can be specified, and set x-launch-check: [--no-sandbox] for goose. Assisted-by: Claude Sonnet 4.6 via OpenCode
1 parent d5d4a56 commit 342a256

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,16 +1085,24 @@ jobs:
10851085
if: steps.arch-check.outputs.skip != 'true'
10861086
run: |
10871087
APP_ID="${{ steps.app-meta.outputs.app_id }}"
1088+
# Read optional per-app launch args (e.g. --no-sandbox for Electron root runs)
1089+
LAUNCH_ARGS=""
1090+
if [[ -f "flatpaks/${{ matrix.app }}/release.yaml" ]]; then
1091+
LAUNCH_ARGS=$(yq -r '(.["x-launch-check"] // []) | join(" ")' \
1092+
"flatpaks/${{ matrix.app }}/release.yaml")
1093+
elif [[ -f "flatpaks/${{ matrix.app }}/manifest.yaml" ]]; then
1094+
LAUNCH_ARGS=$(yq -r '(.["x-launch-check"] // []) | join(" ")' \
1095+
"flatpaks/${{ matrix.app }}/manifest.yaml")
1096+
fi
10881097
set +e
1089-
timeout 5 flatpak run "${APP_ID}"
1098+
# shellcheck disable=SC2086
1099+
timeout 5 flatpak run "${APP_ID}" ${LAUNCH_ARGS}
10901100
EXIT=$?
10911101
set -e
10921102
if [[ "${EXIT}" -eq 0 ]]; then
10931103
echo "==> PASS: ${APP_ID} ran and exited cleanly (exit 0)"
10941104
elif [[ "${EXIT}" -eq 124 ]]; then
10951105
echo "==> PASS: ${APP_ID} launched successfully (exit 124 — timed out, app did not self-exit)"
1096-
echo " HINT: consider adding x-launch-check: [--version] to the app manifest for"
1097-
echo " a cleaner headless smoke test (e.g. 'flatpak run ${APP_ID} --version')."
10981106
else
10991107
echo "ERROR: ${APP_ID} launch failed (exit ${EXIT})" >&2
11001108
exit 1

flatpaks/goose/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ title: Goose
88
description: Goose AI agent - Flatpak repack
99
license: Apache-2.0
1010
chunkah-max-layers: "16"
11+
x-launch-check: ["--no-sandbox"]
1112

0 commit comments

Comments
 (0)