SIGN IN SIGN UP

fix(cli): resolve agent command in login to fix spawn EINVAL on Windows

Node 20.12+/24 refuse to spawn .cmd files directly without shell:true
(CVE-2024-27980 mitigation), so on Windows with CURSOR_AGENT_BIN
pointing at agent.cmd the login subcommand crashed with EINVAL.

The chat path already routes through resolveAgentCommand, which on
Windows resolves agent.cmd to node.exe + index.js. Use the same
helper in login.ts. On non-win32 platforms resolveAgentCommand is a
passthrough, so behavior there is unchanged.
M
mrjeye committed
d89e9e06fd37b93034ea6ceca86b697c68479951
Parent: 153c846
Committed by jiangjun <1@j99.uno> on 5/20/2026, 4:24:02 AM