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

Propagate exit status of child process to main process #22

Merged
merged 1 commit into from
Jul 25, 2019

Conversation

atty303
Copy link
Contributor

@atty303 atty303 commented Jul 24, 2019

If the task is exited with non-zero status, mask itself exit with that status.
Because i used this in the CI pipeline.

maskfile.md

## test

~~~sh
exit 1
~~~

Current Behavior

$ mask test
$ echo $?
0

Changed Behavior

$ mask test
$ echo $?
1

Thanks to make very useful application 👍

@jacobdeichert
Copy link
Owner

Thanks for the PR! I’ll take a look at this tonight 👍

None => return
},
Err(err) => eprintln!("ERROR: {}", err)
}
Copy link
Owner

Choose a reason for hiding this comment

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

This works great! Now we can chain commands...

mask test && echo SUCCESS

Copy link
Owner

@jacobdeichert jacobdeichert left a comment

Choose a reason for hiding this comment

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

Thanks again for this. I'll add a test and release tonight or tomorrow 👍

@jacobdeichert jacobdeichert merged commit 8c58e3d into jacobdeichert:master Jul 25, 2019
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