Sha256: b999c65cf332a2088fbdf1c32db613962c3132b26f42e755ddfdf17414d3c3de

Contents?: true

Size: 491 Bytes

Versions: 37

Compression:

Stored size: 491 Bytes

Contents

require 'open3'

module Gitlab
  module Git
    module Popen
      def popen(cmd, path)
        vars = { "PWD" => path }
        options = { :chdir => path }

        @cmd_output = ""
        @cmd_status = 0
        Open3.popen3(vars, cmd, options) do |stdin, stdout, stderr, wait_thr|
          @cmd_status = wait_thr.value.exitstatus
          @cmd_output << stdout.read
          @cmd_output << stderr.read
        end

        return @cmd_output, @cmd_status
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
gitlab_git-5.7.1 lib/gitlab_git/popen.rb
gitlab_git-5.7.0 lib/gitlab_git/popen.rb
gitlab_git-5.6.0 lib/gitlab_git/popen.rb
gitlab_git-5.5.0 lib/gitlab_git/popen.rb
gitlab_git-5.4.0 lib/gitlab_git/popen.rb
gitlab_git-5.3.0 lib/gitlab_git/popen.rb
gitlab_git-5.2.0 lib/gitlab_git/popen.rb
gitlab_git-5.1.0 lib/gitlab_git/popen.rb
gitlab_git-5.0.0 lib/gitlab_git/popen.rb
gitlab_git-4.1.0 lib/gitlab_git/popen.rb
gitlab_git-4.0.0 lib/gitlab_git/popen.rb
gitlab_git-4.0.0.pre lib/gitlab_git/popen.rb
gitlab_git-3.1.0 lib/gitlab_git/popen.rb
gitlab_git-3.0.1 lib/gitlab_git/popen.rb
gitlab_git-3.0.0 lib/gitlab_git/popen.rb
gitlab_git-1.3.1 lib/gitlab_git/popen.rb
gitlab_git-3.0.0.rc2 lib/gitlab_git/popen.rb
gitlab_git-3.0.0.rc1 lib/gitlab_git/popen.rb
gitlab_git-3.0.0.beta1 lib/gitlab_git/popen.rb
gitlab_git-3.0.0.pre lib/gitlab_git/popen.rb