Skip to content

Instantly share code, notes, and snippets.

@plukevdh
Created November 3, 2015 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plukevdh/ba2181fa18ca53cc89a6 to your computer and use it in GitHub Desktop.
Save plukevdh/ba2181fa18ca53cc89a6 to your computer and use it in GitHub Desktop.
Helps with chaining system commands and aborting when fails occur
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