feat(macos): prompt for CLI install
This commit is contained in:
@@ -177,8 +177,8 @@ elif [ "$SIGN" -eq 1 ]; then
|
||||
unset SIGN_IDENTITY
|
||||
fi
|
||||
|
||||
# 3) Package app (default to bundling the embedded gateway + CLI).
|
||||
run_step "package app" bash -lc "cd '${ROOT_DIR}' && SKIP_TSC=${SKIP_TSC:-1} SKIP_GATEWAY_PACKAGE=${SKIP_GATEWAY_PACKAGE:-0} '${ROOT_DIR}/scripts/package-mac-app.sh'"
|
||||
# 3) Package app (no embedded gateway).
|
||||
run_step "package app" bash -lc "cd '${ROOT_DIR}' && SKIP_TSC=${SKIP_TSC:-1} '${ROOT_DIR}/scripts/package-mac-app.sh'"
|
||||
|
||||
choose_app_bundle() {
|
||||
if [[ -n "${APP_BUNDLE}" && -d "${APP_BUNDLE}" ]]; then
|
||||
@@ -205,7 +205,7 @@ choose_app_bundle
|
||||
|
||||
APP_BUNDLE_ID="$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "${APP_BUNDLE}/Contents/Info.plist" 2>/dev/null || true)"
|
||||
|
||||
# When unsigned, avoid the app overwriting the LaunchAgent with the relay binary.
|
||||
# When unsigned, avoid the app overwriting the LaunchAgent while iterating.
|
||||
if [ "$NO_SIGN" -eq 1 ]; then
|
||||
if [[ -n "${APP_BUNDLE_ID}" ]]; then
|
||||
run_step "set attach-existing-only" \
|
||||
@@ -239,8 +239,7 @@ else
|
||||
fail "App exited immediately. Check ${LOG_PATH} or Console.app (User Reports)."
|
||||
fi
|
||||
|
||||
# When unsigned, launchd cannot exec the app relay binary. Ensure the gateway
|
||||
# LaunchAgent targets the repo CLI instead (after the app has launched).
|
||||
# When unsigned, ensure the gateway LaunchAgent targets the repo CLI (after the app launches).
|
||||
if [ "$NO_SIGN" -eq 1 ]; then
|
||||
run_step "install gateway launch agent (unsigned)" bash -lc "cd '${ROOT_DIR}' && node dist/entry.js daemon install --force --runtime node"
|
||||
run_step "restart gateway daemon (unsigned)" bash -lc "cd '${ROOT_DIR}' && node dist/entry.js daemon restart"
|
||||
|
||||
Reference in New Issue
Block a user