refactor: improve network error and allow verbose output (#36923)

This commit is contained in:
Yunlu Wen authored and GitHub committed 2026-06-02 10:43:40 +00:00
1 parent b682591c7a
commit f19679b217
28 files changed
+339 -231

No files matched your search

+4 -1
View File
@@ -45,7 +45,10 @@ export async function run(tree: CommandTree, argv: string[]): Promise<void> {
if (typeof Ctor.deprecated === 'string' && Ctor.deprecated.length > 0)
process.stderr.write(`deprecated: ${Ctor.deprecated}\n`)
const cmd = new Ctor()
const output = await cmd.run(argv.slice(resolved.path.length))
const commandArgv = argv.slice(resolved.path.length)
cmd.processGlobalFlags(commandArgv)
const output = await cmd.run(commandArgv)
if (output !== undefined)
process.stdout.write(stringifyOutput(output))
}