piotrmurach/tty-command

View on GitHub
examples/env.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require_relative "../lib/tty-command"

cmd = TTY::Command.new

out, = cmd.run("env | grep FOO", env: { "FOO" => "hello" })

puts "Result: #{out}"