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(run): return correct exit code on recipe failure #77

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

haveiss
Copy link
Collaborator

@haveiss haveiss commented Dec 17, 2024

Changes

  • cmd/run.go command now returns exit code 1 if any recipe fails, enabling proper error handling

Example output when some recipe fails

Some recipes were not successful
2 failing, 0 successful, and 2 total

Status  Recipe          Source  Duration(ms)    Records
✘       test-foo        csv     0 ms            0      
✘       test-bar        csv     0 ms            0      
2 recipes failed
exit status 1
➜  echo $?
1

Example output when the run successful

All recipes ran successful
0 failing, 1 successful, and 1 total

Status  Recipe          Source  Duration(ms)    Records
✓       test-foo        csv     196 ms        
➜  echo $?
0

Copy link

@sumslim sumslim left a comment

Choose a reason for hiding this comment

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

LGTM

@haveiss haveiss merged commit 3711fea into main Dec 17, 2024
55 of 56 checks passed
@haveiss haveiss deleted the fix/handle-run-exit-code branch December 17, 2024 12:02
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