Skip to content

Instantly share code, notes, and snippets.

@thbar
Created June 18, 2015 07:32
Show Gist options
  • Save thbar/24e26b40007a3be05936 to your computer and use it in GitHub Desktop.
Save thbar/24e26b40007a3be05936 to your computer and use it in GitHub Desktop.
Running a command and capturing output with Elixir
# not sure how yet to capture the output and stream it back
IO.puts "Calling..."
{ output, exit_code } = System.cmd("bundle", ["outdated"])
IO.puts "Exit code is #{exit_code}"
IO.puts "Output is #{output}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment