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

Fail when a command returns ≠ 0 #11

Closed
Profpatsch opened this issue Mar 12, 2019 · 0 comments · Fixed by #16
Closed

Fail when a command returns ≠ 0 #11

Profpatsch opened this issue Mar 12, 2019 · 0 comments · Fixed by #16

Comments

@Profpatsch
Copy link
Contributor

Profpatsch commented Mar 12, 2019

mdsh should run all commands, fail if one command returned non-success and then output all commands that failed (with their stdout and stderr), in a way that is nice to integrate with CI.

Reasoning: I want to be able to use mdsh as a kind of doctest for README.md files, to make sure the examples always work.

I will prepare a PR.

Profpatsch added a commit to Profpatsch/mdsh that referenced this issue Mar 15, 2019
We capture the stderr of all commands and collect the Outputs of all
commands that failed. If any fails, we let mdsh fail with status 1 and
print the status and stderr of all failing commands to stderr.

This way integration of mdsh into CI is made possible, letting it act
as a “doctest” for markdown files, checking the integrity of for
example tutorials.

Fixes zimbatm#11
Profpatsch added a commit to Profpatsch/mdsh that referenced this issue Mar 15, 2019
We capture the stderr of all commands and collect the Outputs of all
commands that failed. If any fails, we let mdsh fail with status 1 and
print the status and stderr of all failing commands to stderr.

This way integration of mdsh into CI is made possible, letting it act
as a “doctest” for markdown files, checking the integrity of for
example tutorials.

Fixes zimbatm#11
Profpatsch added a commit to Profpatsch/mdsh that referenced this issue Mar 15, 2019
We capture the stderr of all commands and collect the Outputs of all
commands that failed. If any fails, we let mdsh fail with status 1 and
print the status and stderr of all failing commands to stderr.

This way integration of mdsh into CI is made possible, letting it act
as a “doctest” for markdown files, checking the integrity of for
example tutorials.

Fixes zimbatm#11
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 a pull request may close this issue.

1 participant