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

Add exec variant that allows a negative call #55

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

smelc
Copy link
Contributor

@smelc smelc commented Jan 11, 2024

Description

Right now, all functions in Process.hs assume that the call will succeed: they fail the test if the call fails.

This PR adds new variants that do not make this assumption, allowing callers to execute processes that will fail, and handle the exit code, stdout, and stderr themselves.

Context

Needed for IntersectMBO/cardano-node#5634

-> String
-> String
-> [String]
-> m (ExitCode, String, String)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment what's returned here? I guess stdout and stderr but in what order?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 👍

=> ExecConfig
-> String
-> [String]
-> m (ExitCode, String, String)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, a comment explaining Strings in the signature would be great.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done 👍

@smelc smelc merged commit 06f32cd into main Jan 11, 2024
16 checks passed
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.

3 participants