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

ABP CLI - Throw exceptions instead swallowing #18519

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

enisn
Copy link
Member

@enisn enisn commented Dec 19, 2023

Description

ABP CLI exit code is always 0 even if there is an error. When it's used in pipeline (abp install-libs), or it's called by another program (abpdev in my case), errors can't be recognized.

image
Exit code 0 here 👆

So, I threw the exception instead of swallowing it. And now, when a command fails in ABP CLI, it can be handled programmatically.

Checklist

  • I fully tested it as developer / designer and created unit / integration tests
  • I documented it (or no need to document or I will create a separate documentation issue)

How to test it?

Please describe how this can be tested by the test engineers if it is not already explicit - or remove this section if no need to description.

@enisn enisn added the abp-cli label Dec 19, 2023
@enisn enisn added this to the 8.1-preview milestone Dec 19, 2023
@enisn enisn requested a review from EngincanV December 19, 2023 06:11
Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (b95482b) 51.72% compared to head (fd99894) 51.72%.
Report is 66 commits behind head on dev.

Files Patch % Lines
...k/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliService.cs 0.00% 1 Missing ⚠️
...bp.Cli.Core/Volo/Abp/Cli/Commands/BundleCommand.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##              dev   #18519   +/-   ##
=======================================
  Coverage   51.72%   51.72%           
=======================================
  Files        3075     3075           
  Lines       96860    96949   +89     
  Branches     7711     7719    +8     
=======================================
+ Hits        50096    50146   +50     
- Misses      45232    45268   +36     
- Partials     1532     1535    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EngincanV EngincanV merged commit 346772c into dev Dec 19, 2023
4 of 5 checks passed
@EngincanV EngincanV deleted the 7.4-bundle-exit-code branch December 19, 2023 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants