Skip to content

Windows CI 错误#2

Merged
Loongphy merged 4 commits intomainfrom
cursor/windows-ci-4b92
Feb 10, 2026
Merged

Windows CI 错误#2
Loongphy merged 4 commits intomainfrom
cursor/windows-ci-4b92

Conversation

@Loongphy
Copy link
Owner

Implement cross-platform compatibility for time functions, TTY detection, and interactive input to fix Windows CI failures.

The Windows CI was failing due to the use of POSIX-specific functions like localtime_r, isatty, and raw terminal mode for interactive selection. This PR introduces a localtimeCompat wrapper, uses std.fs.File.stdout().isTty() for TTY checks, and falls back to numerical input for interactive selections on Windows targets.


Open in Cursor Open in Web

Co-authored-by: Loongphy Wei <Loongphy@users.noreply.github.com>
@cursor
Copy link

cursor bot commented Feb 10, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@macroscopeapp
Copy link

macroscopeapp bot commented Feb 10, 2026

Fix Windows CI by forcing numeric selection in cli.selectAccount and cli.selectAccountsToRemove, replacing TTY detection with std.fs.File.stdout().isTty(), and adding localtimeCompat-based time formatting in CLI and formatter

Switch TTY checks to std.fs.File.stdout().isTty(), gate interactive selection off on Windows in CLI, add localtimeCompat and replace direct c.localtime_r calls, and return 0 width on Windows while using POSIX ioctl elsewhere.

📍Where to Start

Start with localtimeCompat and its usage in resetPartsAlloc and time formatting in src/format.zig, then review the OS-gated selection logic in src/cli.zig.


Macroscope summarized 102b1f2.

@Loongphy Loongphy marked this pull request as ready for review February 10, 2026 13:06
@macroscopeapp
Copy link

macroscopeapp bot commented Feb 10, 2026

Fix Windows CI by adding cross-platform TTY and time handling in src/cli.zig and src/format.zig

Introduce cross-platform TTY checks via std.fs.File.stdout().isTty(), add localtimeCompat for Windows and POSIX, and route Windows selection flows to numeric-only paths.

📍Where to Start

Start with localtimeCompat in src/format.zig, then review the matching helper and selection changes in src/cli.zig.


Macroscope summarized 2a9c181.

@Loongphy
Copy link
Owner Author

@macroscope-app review

@macroscopeapp
Copy link

macroscopeapp bot commented Feb 10, 2026

Review complete! No issues found. You can view the full results here:

cursoragent and others added 2 commits February 10, 2026 13:28
Co-authored-by: Loongphy Wei <Loongphy@users.noreply.github.com>
Co-authored-by: Loongphy Wei <Loongphy@users.noreply.github.com>
Co-authored-by: Loongphy Wei <Loongphy@users.noreply.github.com>
@Loongphy
Copy link
Owner Author

@macroscope-app review

@macroscopeapp
Copy link

macroscopeapp bot commented Feb 10, 2026

Review complete! No issues found. You can view the full results here:

@Loongphy Loongphy merged commit 0bc1c24 into main Feb 10, 2026
9 checks passed
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.

2 participants