mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 06:16:37 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { initUI, box, color, dim, sectionHeader, subheader } from '../utils/ui';
|
||||
|
||||
// Version is read from VERSION file during build
|
||||
const VERSION = '5.3.0';
|
||||
// Get version from package.json (same as version-command.ts)
|
||||
const VERSION = JSON.parse(
|
||||
fs.readFileSync(path.join(__dirname, '../../package.json'), 'utf8')
|
||||
).version;
|
||||
|
||||
/**
|
||||
* Print a major section with ═══ borders (only for 3 main sections)
|
||||
|
||||
Reference in New Issue
Block a user