Skip to content

feat: support --ignore-error - #17

Merged
popomore merged 5 commits into
masterfrom
check-status
Dec 12, 2017
Merged

feat: support --ignore-error#17
popomore merged 5 commits into
masterfrom
check-status

Conversation

@atian25

Copy link
Copy Markdown
Member
Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

@popomore

Copy link
Copy Markdown
Member

默认还是支持吧

@atian25

atian25 commented Dec 7, 2017 via email

Copy link
Copy Markdown
MemberAuthor

@popomore

Copy link
Copy Markdown
Member

嗯,加了这个参数不 exit 就好了

@atian25atian25 changed the title fix: only interrupt startup when failOnStdErr:truefeat: support --ignore-errorDec 8, 2017
@atian25

Copy link
Copy Markdown
MemberAuthor

@popomore 改为 --ignore-error

Comment threadlib/cmd/start.js Outdated
}

* checkStatus({ stderr, timeout }) {
* checkStatus({ stderr, timeout, 'ignore-error': ignoreError }) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该会转成驼峰的吧

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

前面有个 removeAlias 干掉了它

Comment threadlib/cmd/start.js
if (stat && stat.size > 0) {
const [ stdout ] = yield exec('tail -n 100 ' + stderr);
this.logger.error(stdout);
this.logger.error('Start failed, see %s', stderr);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该不用改吧,�只是根据参数判断 isSuccess 是否返回 true

@atian25atian25Dec 11, 2017

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个算是风格问题吧,感觉放到外面好点吧,while 里面只是循环 stat

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

主要这里有两个标志位,以后加逻辑比较容易错。

@popomore

Copy link
Copy Markdown
Member

建议改成 ignore-stderr

@atian25

Copy link
Copy Markdown
MemberAuthor

建议改成 ignore-stderr

可以

@atian25

Copy link
Copy Markdown
MemberAuthor

改为 ignore-stderr 了,其他 2 个不用改吧?

@popomore
popomore merged commit b5559d5 into masterDec 12, 2017
@popomore
popomore deleted the check-status branch December 12, 2017 09:42
@atian25

Copy link
Copy Markdown
MemberAuthor

@popomore 你发吧

@popomore

Copy link
Copy Markdown
Member
  • egg-scripts@2.5.0

Comment threadlib/cmd/start.js
// nothing
}
isSuccess = ignoreStdErr;
this.logger.error('Start got error, see %s', stderr);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

随便改文案很容易把用例搞挂

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

喔喔,忘记你们还继承了,下次注意

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

egg-mongoose 警告 导致egg-scripts 无法正常启动 [egg-scripts] 启动时有 stderr 会失败

2 participants

@atian25@popomore