Sha256: 05d9303ab84412a159e38389a430b3e4acb9671d7df5ef06358d52a4e57f9197

Contents?: true

Size: 302 Bytes

Versions: 7

Compression:

Stored size: 302 Bytes

Contents

require 'pre-commit/checks/plugin'
require 'open3'

module PreCommit
  module Checks
    class Shell < Plugin

    private

      def execute(command)
        _, stdout, stderr, process = Open3.popen3(command)
        stdout.read + stderr.read unless process.value.success?
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pre-commit-0.19.0 lib/pre-commit/checks/shell.rb
pre-commit-0.18.0 lib/pre-commit/checks/shell.rb
pre-commit-0.17.0 lib/pre-commit/checks/shell.rb
pre-commit-0.16.3 lib/pre-commit/checks/shell.rb
pre-commit-0.16.2 lib/pre-commit/checks/shell.rb
pre-commit-0.16.1 lib/pre-commit/checks/shell.rb
pre-commit-0.16.0 lib/pre-commit/checks/shell.rb