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 the process if exec fails #236

Merged
merged 1 commit into from
Nov 6, 2015

Conversation

seanpdoyle
Copy link
Contributor

When running install_dependencies or compile, failures won't halt
the host program.

This could lead to false positives and difficult to debug scenarios.

Consumers would prefer this to fail as early on as possible.

@@ -339,7 +339,7 @@ def env_hash

def exec(cmd, method: :system)
Dir.chdir root do
Kernel.public_send(method, env_hash, cmd, err: :out)
Kernel.public_send(method, env_hash, cmd, err: :out) or fail(cmd)

Choose a reason for hiding this comment

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

Use || instead of or.

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@geoffharcourt yup, ended up using that here

@seanpdoyle seanpdoyle force-pushed the sd-fail-with-non-zero-exit-status branch from 9ba5b36 to b8b8963 Compare November 3, 2015 14:31
@geoffharcourt
Copy link

This slipped my mind before, but is there a way to test this by simulating the failure of a dependency build?

@seanpdoyle
Copy link
Contributor Author

@geoffharcourt do you mean in a test?

@geoffharcourt
Copy link

Yeah. Unfortunately we didn't do it in Parity on the same type of change, so maybe that's overkill.

@seanpdoyle seanpdoyle force-pushed the sd-fail-with-non-zero-exit-status branch 2 times, most recently from 5e6d461 to dd68cd0 Compare November 6, 2015 19:40
When running `install_dependencies` or `compile`, failures won't halt
the host program.

This could lead to false positives and difficult to debug scenarios.

Consumers would prefer this to fail as early on as possible.
@seanpdoyle seanpdoyle force-pushed the sd-fail-with-non-zero-exit-status branch from dd68cd0 to afa84fa Compare November 6, 2015 19:42
@seanpdoyle seanpdoyle merged commit afa84fa into master Nov 6, 2015
@seanpdoyle seanpdoyle deleted the sd-fail-with-non-zero-exit-status branch November 6, 2015 19:51
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