mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 10:19: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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Non-interactive (piped stdin)
|
// Non-interactive (piped stdin) - skip on Windows
|
||||||
if (!process.stdin.isTTY) {
|
// 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;
|
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';
|
import { initUI, box, color, dim, sectionHeader, subheader } from '../utils/ui';
|
||||||
|
|
||||||
// Version is read from VERSION file during build
|
// Get version from package.json (same as version-command.ts)
|
||||||
const VERSION = '5.3.0';
|
const VERSION = JSON.parse(
|
||||||
|
fs.readFileSync(path.join(__dirname, '../../package.json'), 'utf8')
|
||||||
|
).version;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print a major section with ═══ borders (only for 3 main sections)
|
* Print a major section with ═══ borders (only for 3 main sections)
|
||||||
|
|||||||
Reference in New Issue
Block a user