Skip to content

Commit 6843537

Browse files
committed
refactor: ignore-stderr
1 parent 621a149 commit 6843537

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ $ eggctl start [options] [baseDir]
5454
- `stdout` - customize stdout file, default to `$HOME/logs/master-stdout.log`.
5555
- `stderr` - customize stderr file, default to `$HOME/logs/master-stderr.log`.
5656
- `timeout` - the maximum timeout when app starts, default to 300s.
57-
- `ignore-error` - whether ignore stderr when app starts.
57+
- `ignore-stderr` - whether ignore stderr when app starts.
5858

5959
### stop
6060

lib/cmd/start.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class StartCommand extends Command {
5959
type: 'number',
6060
default: 300 * 1000,
6161
},
62-
'ignore-error': {
62+
'ignore-stderr': {
6363
description: 'whether ignore stderr when app starts',
6464
type: 'boolean',
6565
},
@@ -132,7 +132,7 @@ class StartCommand extends Command {
132132
this.logger.info('Starting %s application at %s', this.frameworkName, baseDir);
133133

134134
// remove unused properties from stringify, alias had been remove by `removeAlias`
135-
const ignoreKeys = [ '_', '$0', 'env', 'daemon', 'stdout', 'stderr', 'timeout', 'ignore-error' ];
135+
const ignoreKeys = [ '_', '$0', 'env', 'daemon', 'stdout', 'stderr', 'timeout', 'ignore-stderr' ];
136136
const eggArgs = [ this.serverBin, stringify(argv, ignoreKeys), `--title=${argv.title}` ];
137137
this.logger.info('Run node %s', eggArgs.join(' '));
138138

@@ -181,7 +181,7 @@ class StartCommand extends Command {
181181
return name;
182182
}
183183

184-
* checkStatus({ stderr, timeout, 'ignore-error': ignoreError }) {
184+
* checkStatus({ stderr, timeout, 'ignore-stderr': ignoreStdErr }) {
185185
let count = 0;
186186
let hasError = false;
187187
let isSuccess = true;
@@ -214,7 +214,7 @@ class StartCommand extends Command {
214214
} catch (_) {
215215
// nothing
216216
}
217-
isSuccess = ignoreError;
217+
isSuccess = ignoreStdErr;
218218
this.logger.error('Start got error, see %s', stderr);
219219
}
220220

0 commit comments

Comments
 (0)