fix(windows): drop hardcoded lsof from backend http-bind-failure text#139
Merged
Conversation
The HTTP-bind-failure path in `lib.rs::spawn_http_server` writes a
plaintext diagnostic into `status.http_error` that the frontend renders
verbatim above the OS-specific `settings.http_error.hint.{os}` line.
The previous text included `lsof -i :{port}` — a macOS/Linux-only
command. On Windows the user would see the Mac `lsof` suggestion
*above* the correct PowerShell suggestion (Get-NetTCPConnection /
OwningProcess), which is confusing and contradicts the platform-aware
i18n split established in PR #128.
Fix: drop the diagnostic-command sentence from the backend text. The
plaintext now just states "port is held by another process" + the
underlying error; the OS-correct command stays where it already lives,
in the frontend hint.
Caught while auditing the v0.4.40 → v0.4.46 delta for Windows-only
regressions before handing the next NSIS build to the external tester.
Verification (macOS arm64): cargo check / clippy `-D warnings` /
test --lib (98/98), all clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
When the HTTP server fails to bind,
lib.rs::spawn_http_serverwrites a plaintext error intostatus.http_errorthat the frontend renders verbatim — directly above the OS-specificsettings.http_error.hint.{os}line. The plaintext includedlsof -i :{port}. On Windows, the tester would see two contradictory suggestions stacked: Maclsoffrom the backend, then the correct PowerShellGet-NetTCPConnectionfrom the i18n hint.Backend message is now platform-neutral; the OS-correct command stays in the frontend hint where it already lives.
Why now
Audit of the v0.4.40 → v0.4.46 delta before handing the next NSIS build to the Windows tester. This is the only Windows-affecting regression I found in that range —
set_activation_policy(Accessory),RunEvent::Reopen, and the newfs4advisory-lock crate are all platform-clean.Test plan
-D warnings/ test --lib (98/98) — clean on macOS arm64lsofabove the PowerShell hint🤖 Generated with Claude Code