Created
November 3, 2015 16:14
-
-
Save plukevdh/ba2181fa18ca53cc89a6 to your computer and use it in GitHub Desktop.
Helps with chaining system commands and aborting when fails occur
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def abortable_run(cmd) | |
abort("Failed with #{$?.exitstatus}") unless system(cmd) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment