Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: should exit with non-zero when error occur #47

Merged
merged 1 commit into from
Aug 19, 2022

Conversation

lianghx-319
Copy link
Contributor

Types of changes

  • New feature
  • Bug fix
  • Documentation change
  • Coding style change
  • Refactoring
  • Performance improvement
  • Test cases
  • Continuous integration
  • Typescript definition change
  • Breaking change

Background and context

While command line show error with zero exit code, many execution environment will success, but it should be failed.

Solution

Make all exit with non-zero if show error

How is the change tested?

Changelog

Changelog(CN) Changelog(EN) Related issues
使用正确的 exitCode 退出进程 Use the correct exitCode to exit process N/A

Checklist:

  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others should be submitted to master branch)

Other information

@lianghx-319
Copy link
Contributor Author

Otherwise I think using throw error instead of process.exit(1) is better. Maybe those method will reuse in the future and the process object cause unnecessary refactor. Using throw error, it can be caught wherever.

@lianghx-319
Copy link
Contributor Author

@MisterLuffy Can you have a look, when you have time for it.

@Helium-Z Helium-Z merged commit 6de215c into arco-design:main Aug 19, 2022
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.

2 participants