Skip to content

Commit 7f2cecf

Browse files
authored
fix: head 100 stderr when startup failed (#59)
1 parent 35fd6aa commit 7f2cecf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/cmd/start.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,12 @@ class StartCommand extends Command {
265265
try {
266266
const args = [ '-n', '100', stderr ];
267267
this.logger.error('tail %s', args.join(' '));
268-
const [ stdout ] = await execFile('tail', args);
268+
const [ headStdout ] = await execFile('head', args);
269+
const [ tailStdout ] = await execFile('tail', args);
269270
this.logger.error('Got error when startup: ');
270-
this.logger.error(stdout);
271+
this.logger.error(headStdout);
272+
this.logger.error('...');
273+
this.logger.error(tailStdout);
271274
} catch (err) {
272275
this.logger.error('ignore tail error: %s', err);
273276
}

0 commit comments

Comments
 (0)