Skip to content

chore(cli): extract shared detached-spawn helper (#2729)#711

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jul 20, 2026
Merged

chore(cli): extract shared detached-spawn helper (#2729)#711
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.

* chore(cli): extract shared detached-spawn helper

Four CLI sites copy-pasted the detached LaunchServices spawn recipe
(detached, stdio ignore, unref, ELECTRON_RUN_AS_NODE scrubbed so the
launched GUI does not boot as a headless Node host): launchDesktop,
ok open, the single-file open path, and ok bug-report's Finder reveal.
Consolidate into spawnDetachedScrubbed in cli/src/utils/detached-spawn.ts
with the scrub encoded once. bug-report previously inherited the parent
env unscrubbed; it now goes through the same scrub (a no-op for the
Finder reveal target).

* chore(cli): make scrubElectronRunAsNode module-private

Post-consolidation the only remaining caller of scrubElectronRunAsNode is
spawnDetachedScrubbed in the same file, so the export no longer earns its
place. Drop the export and the two direct unit tests; the scrub and
non-mutation contract stays pinned behaviorally through the
spawnDetachedScrubbed env tests (explicit-env scrub + process.env default
non-mutation). No coverage lost, narrower module surface.

Addresses review feedback on #2729.

GitOrigin-RevId: 558ec9b093d1b23f1b0ab90de8a65f4e959ea10a
@inkeep-oss-sync
inkeep-oss-sync Bot merged commit f01101b into main Jul 20, 2026
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch July 20, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant