fix(cliproxy): resolve windows auth browser not opening

- skip TTY check on Windows (process.stdin.isTTY returns undefined)
- Windows desktop environments always have browser capability
- also fix help-command version to read from package.json

Closes #42
This commit is contained in:
kaitranntt
2025-12-02 21:10:38 -05:00
parent 9f40a0e255
commit af4d6cff89
2 changed files with 10 additions and 4 deletions
+4 -2
View File
@@ -94,8 +94,10 @@ function isHeadlessEnvironment(): boolean {
return true;
}
// Non-interactive (piped stdin)
if (!process.stdin.isTTY) {
// Non-interactive (piped stdin) - skip on Windows
// Windows npm wrappers don't set isTTY correctly (returns undefined, not true)
// Windows desktop environments always have browser capability
if (process.platform !== 'win32' && !process.stdin.isTTY) {
return true;
}