chore(cli): extract shared detached-spawn helper (#2729)#711
Merged
Conversation
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copybara-translated 1 Inkeep OSS change. Rebase-merge this PR so the prepared commit lands directly on public main.