fix: run resource-skew check before early TTY gate
The early TTY check blocked the resource-skew detection test which runs gsd with piped stdin. Move exitIfManagedResourcesAreNewer() before the TTY gate so version mismatch errors surface in non-TTY environments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7cf97bcd98
commit
43634c4ba3
1 changed files with 4 additions and 0 deletions
|
|
@ -94,6 +94,10 @@ function parseCliArgs(argv: string[]): CliFlags {
|
|||
const cliFlags = parseCliArgs(process.argv)
|
||||
const isPrintMode = cliFlags.print || cliFlags.mode !== undefined
|
||||
|
||||
// Early resource-skew check — must run before TTY gate so version mismatch
|
||||
// errors surface even in non-TTY environments.
|
||||
exitIfManagedResourcesAreNewer(agentDir)
|
||||
|
||||
// Early TTY check — must come before heavy initialization to avoid dangling
|
||||
// handles that prevent process.exit() from completing promptly.
|
||||
const hasSubcommand = cliFlags.messages.length > 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue