Fix macOS packaged CLI daemon Dock icons (#1759)

* Fix macOS CLI daemon relaunch path

* test(cli): mock helper existence in daemon launch test

* fix(desktop): launch packaged CLI through Helper

The packaged macOS CLI shim entered through the main app executable, so daemon supervision inherited app lifecycle behavior and surfaced Dock icons. Make Helper the required macOS CLI runtime, keep daemon relaunches on process.execPath, and cover cold bundled CLI daemon starts in release smoke.

---------

Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
This commit is contained in:
yz
2026-06-29 20:45:53 +02:00
committed by GitHub
co-authored by Mohamed Boudra
parent f94ec0e430
commit efd7ab3420
4 changed files with 274 additions and 7 deletions
+12 -6
View File
@@ -20,12 +20,18 @@ done
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$SCRIPT_PATH")" && pwd)
RESOURCES_DIR=$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)
# macOS: MacOS/Paseo is a sibling of Resources/
# Linux: the executable sits next to resources/. Prefer Paseo.bin when present
# because Paseo is a GUI wrapper that adds Chromium flags not accepted by
# ELECTRON_RUN_AS_NODE.
if [ -x "${RESOURCES_DIR}/../MacOS/Paseo" ]; then
APP_EXECUTABLE="${RESOURCES_DIR}/../MacOS/Paseo"
MACOS_DIR="${RESOURCES_DIR}/../MacOS"
MACOS_HELPER_EXECUTABLE="${RESOURCES_DIR}/../Frameworks/Paseo Helper.app/Contents/MacOS/Paseo Helper"
# macOS CLI invocations must enter Electron through the agent Helper. Launching
# the main APPL executable here makes later daemon supervision inherit app UI
# lifecycle behavior.
if [ -d "${MACOS_DIR}" ]; then
if [ ! -x "${MACOS_HELPER_EXECUTABLE}" ]; then
echo "Bundled Paseo Helper executable not found at ${MACOS_HELPER_EXECUTABLE}" >&2
exit 1
fi
APP_EXECUTABLE="${MACOS_HELPER_EXECUTABLE}"
elif [ -x "${RESOURCES_DIR}/../Paseo.bin" ]; then
APP_EXECUTABLE="${RESOURCES_DIR}/../Paseo.bin"
elif [ -x "${RESOURCES_DIR}/../Paseo" ]; then