Repository navigation
fix(cmd): use portable os.Stdin.Fd for password read on Windows (follow-up to #1279) - #1459
Conversation
…ow-up to #1279) term.ReadPassword takes an int, but syscall.Stdin is an int only on Unix; on Windows it is a syscall.Handle (uintptr), so cmd/configure_azure.go failed to compile under GOOS=windows. Use int(os.Stdin.Fd()), which is portable across platforms, and drop the now-unused syscall import. Addresses the unresolved CodeRabbit review thread on #1279. Verified that the prior code fails `GOOS=windows go build ./cmd/...` with a type error and the fix builds cleanly for both host and windows/amd64.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
…ow-up to #1279) (#1459) * fix(cmd): use portable os.Stdin.Fd for password read on Windows (follow-up to #1279) term.ReadPassword takes an int, but syscall.Stdin is an int only on Unix; on Windows it is a syscall.Handle (uintptr), so cmd/configure_azure.go failed to compile under GOOS=windows. Use int(os.Stdin.Fd()), which is portable across platforms, and drop the now-unused syscall import. Addresses the unresolved CodeRabbit review thread on #1279. Verified that the prior code fails `GOOS=windows go build ./cmd/...` with a type error and the fix builds cleanly for both host and windows/amd64. * fix(cmd): justify terminal descriptor conversion
Follow-up to #1279 — unaddressed CodeRabbit thread
Part of the adversarial-sweep over recently-merged PRs. #1279 merged with an unresolved CodeRabbit
Majorthread.term.ReadPasswordtakes anint, butsyscall.Stdinis anintonly on Unix; on Windows it is asyscall.Handle(uintptr), socmd/configure_azure.gofailed to compile underGOOS=windows. Fix usesint(os.Stdin.Fd())(portable) and drops the now-unusedsyscallimport.Verification
GOOS=windows go build ./cmd/...fails withcannot use syscall.Stdin (variable of uintptr type Handle) as int value.GOOS=windows GOARCH=amd64build both pass.