fix(desktop): stop simple-git custom-binary warning spam on Windows - #91798
fix(desktop): stop simple-git custom-binary warning spam on Windows#91798andrexibiza wants to merge 2 commits into
Conversation
gitFor() opts into simple-git's unsafe.allowUnsafeCustomBinary when the resolved git binary path contains a space (the default Windows install, C:\Program Files\Git\cmd\git.exe). That opt-in trades simple-git's throw for a console.warn emitted on EVERY client construction, and gitFor() is not memoized — the coding rail rebuilds a client on each status poll, so the desktop log filled with hundreds of identical lines that buried real errors. Suppress only that known warning, only for the duration of the construction call, and restore console.warn in a finally so unrelated warnings still surface. Fixes NousResearch#79245
Duplicate of #79250 — this PR has the same focused simple-git warning-suppression implementation and tests for spaced Windows Git paths. |
c515cd9 to
fe5fbdd
Compare
Preserve @hernanda-git's exact implementation commit as first parent while composing the current upstream main tree as second parent. This reissues the identical tree after an unrelated midnight date-boundary UI test flake; no implementation bytes are regenerated.
fe5fbdd to
24f8b20
Compare
|
Current-main composition is complete and merge-authorized. Exact head: The commit is a deliberate two-parent composition:
The resulting PR still changes only Fresh exact-head hosted acceptance:
The immediately preceding identical-tree attempt failed only the unrelated midnight boundary in |
|
Current submitted object has moved since the body’s original receipt, so I re-verified the live head rather than inheriting Current head: Exact-head hosted receipts:
This supersedes the body’s historical |
|
Closure reconciliation against the current object: head |
Summary
Supersedes stale/conflicting #79250 while preserving @hernanda-git's exact implementation and Git authorship.
Hermes Desktop resolves Git from trusted process-local locations. On Windows that is normally
C:\Program Files\Git\cmd\git.exe, sogitFor()must opt into simple-git'sunsafe.allowUnsafeCustomBinaryescape hatch. Simple-git emits the same warning on every client construction even when that opt-in is deliberate; the coding/review rail builds clients repeatedly, flooding the terminal and burying real Desktop errors.This change suppresses only the known custom-binary warning, only during the synchronous
simpleGit()construction call, and restoresconsole.warninfinally. Every unrelated warning remains visible.Field reproduction
A real Windows packaged-app receipt showed the message repeated continuously:
The same receipt also contains genuine ENOENT/API/network failures in the same stream. This PR removes the deterministic noise source without suppressing those independent errors.
Provenance
The original #79250 commit by @hernanda-git was replayed through GitHub onto exact upstream
mainatac8dff4fbcf47a392a3cddcbec068aa05930ab47; the rebased commit retains the original Git author:e90dc2a747d03e124f74b6e41f481d5f296f5119Tests
The focused tests prove:
console.warnis restored immediately, so unrelated warnings still surface;Exact-head verification
All required hosted workflows attached directly to
e90dc2a747d03e124f74b6e41f481d5f296f5119are green:GitHub currently reports the PR mergeable, rebaseable, and
mergeable_state: clean. No status is inherited from #79250 or an adjacent object.