Sha256: 21e3f6a56949b2de840e4ac24ce2ad77ae0dc89c51a6c6c9e4dc3a60fb96aec6
Contents?: true
Size: 466 Bytes
Versions: 1
Compression:
Stored size: 466 Bytes
Contents
require 'open3' class GitlabClusterHelper class Shell class Error < StandardError; end def run(command) puts "Running command: #{command.join(" ")}" stdin, stdout, stderr, wait_thr = Open3.popen3(*command) stdin.close out = stdout.read stdout.close err = stderr.read stderr.close exit_status = wait_thr.value raise Error, out + err unless exit_status.success? out.chomp end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gitlab-cluster-helper-0.1.0 | lib/gitlab_cluster_helper/shell.rb |