diff --git a/packages/desktop/bin/paseo b/packages/desktop/bin/paseo index b307a38a7..fefe6c60a 100755 --- a/packages/desktop/bin/paseo +++ b/packages/desktop/bin/paseo @@ -44,4 +44,6 @@ fi RUNNER_PATH="${RESOURCES_DIR}/app.asar.unpacked/dist/daemon/node-entrypoint-runner.js" CLI_ENTRYPOINT="${RESOURCES_DIR}/app.asar/node_modules/@getpaseo/cli/dist/index.js" -exec env ELECTRON_RUN_AS_NODE=1 PASEO_NODE_ENV=production "${APP_EXECUTABLE}" --disable-warning=DEP0040 "${RUNNER_PATH}" node-script "${CLI_ENTRYPOINT}" "$@" +# PASEO_DESKTOP_MANAGED marks daemons started through this bundled CLI as +# desktop-managed, so the desktop app restarts them when it upgrades. +exec env ELECTRON_RUN_AS_NODE=1 PASEO_NODE_ENV=production PASEO_DESKTOP_MANAGED=1 "${APP_EXECUTABLE}" --disable-warning=DEP0040 "${RUNNER_PATH}" node-script "${CLI_ENTRYPOINT}" "$@" diff --git a/packages/desktop/bin/paseo.cmd b/packages/desktop/bin/paseo.cmd index c0c3c64c2..862f55e79 100644 --- a/packages/desktop/bin/paseo.cmd +++ b/packages/desktop/bin/paseo.cmd @@ -11,5 +11,8 @@ if not exist "%APP_EXECUTABLE%" ( set "ELECTRON_RUN_AS_NODE=1" set "PASEO_NODE_ENV=production" +rem PASEO_DESKTOP_MANAGED marks daemons started through this bundled CLI as +rem desktop-managed, so the desktop app restarts them when it upgrades. +set "PASEO_DESKTOP_MANAGED=1" "%APP_EXECUTABLE%" --disable-warning=DEP0040 "%RESOURCES_DIR%\app.asar.unpacked\dist\daemon\node-entrypoint-runner.js" node-script "%RESOURCES_DIR%\app.asar\node_modules\@getpaseo\cli\dist\index.js" %* exit /b %errorlevel%