Skip to content

Conversation

atian25
Copy link
Member

@atian25 atian25 commented Dec 7, 2017

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
Member

popomore commented Dec 7, 2017

默认还是支持吧

@atian25
Copy link
Member Author

atian25 commented Dec 7, 2017 via email

@popomore
Copy link
Member

popomore commented Dec 7, 2017

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

@atian25 atian25 changed the title fix: only interrupt startup when failOnStdErr:true feat: support --ignore-error Dec 8, 2017
@atian25
Copy link
Member Author

atian25 commented Dec 8, 2017

@popomore 改为 --ignore-error

lib/cmd/start.js Outdated
}

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

Choose a reason for hiding this comment

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

应该会转成驼峰的吧

Copy link
Member Author

Choose a reason for hiding this comment

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

前面有个 removeAlias 干掉了它

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
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

@atian25 atian25 Dec 11, 2017

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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

@popomore
Copy link
Member

建议改成 ignore-stderr

@atian25
Copy link
Member Author

atian25 commented Dec 11, 2017

建议改成 ignore-stderr

可以

@atian25
Copy link
Member Author

atian25 commented Dec 11, 2017

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

@popomore popomore merged commit b5559d5 into master Dec 12, 2017
@popomore popomore deleted the check-status branch December 12, 2017 09:42
@atian25
Copy link
Member Author

atian25 commented Dec 12, 2017

@popomore 你发吧

@popomore
Copy link
Member

  • egg-scripts@2.5.0

// nothing
}
isSuccess = ignoreStdErr;
this.logger.error('Start got error, see %s', stderr);
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

Choose a reason for hiding this comment

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

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

Sign up for free to 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