#!/usr/bin/env ruby require "secret_env" require 'open3' config, env = ARGV.shift(2) if SecretEnv.env?(env: env, secrets_file: config) SecretEnv.load(env: env, secrets_file: config) else SecretEnv.load(env: ENV['SECRET_ENV'], secrets_file: config) ARGV.unshift(env) end stdin, stdoe, t = Open3.popen2e(*ARGV) stdin.close stdoe.each do |line| puts line end exit t.value.exitstatus