fix(dacli): remove process.on('exit') flush — error output now clean
Error path: only log.error() messages shown (stderr, always visible). Buffer discarded on process.exit(), no noise from process logs. --verbose still shows full 26-line output for debugging. Verified 3 scenarios: Default success: 2 lines (v2 summary) --verbose success: 26 lines (full process logs) Default error: 6 lines (only errors, no buffer dump) Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
4e5e271019
commit
7b0ef40f38
1 file changed
-4
@@ -255,10 +255,6 @@ export function buildFormCreateCommand(): Command {
|
||||
.option('--column-naming <style>', 'columnList 命名规范: auto | snake | f_prefix (默认 snake 语义)')
|
||||
.action(async (opts: CreateOpts) => {
|
||||
log.setQuiet(!opts.verbose)
|
||||
// 兜底: 异常退出时 flush 缓冲区, 避免丢失错误上下文
|
||||
if (!opts.verbose) {
|
||||
process.on('exit', () => { log.flush() })
|
||||
}
|
||||
const startTime = Date.now()
|
||||
const fixLog: { silent: any[]; assertive: any[]; suggestions: any[] } = {
|
||||
silent: [], assertive: [], suggestions: [],
|
||||
|
||||
Reference in new issue
Block a user