File: executor.rb

package info (click to toggle)
ruby-jekyll-last-modified-at 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216 kB
  • sloc: ruby: 335; makefile: 4; sh: 3
file content (16 lines) | stat: -rw-r--r-- 318 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require "open3"

module Jekyll
  module LastModifiedAt
    module Executor
      class << self
        def sh(*args)
          stdout_str, stderr_str, status = Open3.capture3(*args)
          "#{stdout_str} #{stderr_str}".strip if status.success?
        end
      end
    end
  end
end