Sha256: 2c8d8335dc8c81bc373cdc27b3efe7c9110809542f721d28fed3c62cc9b191bc
Contents?: true
Size: 322 Bytes
Versions: 2
Compression:
Stored size: 322 Bytes
Contents
require "open3" def command?(name) system "which", name, out: File::NULL, err: File::NULL $?.success? end def which(name) (Open3.capture2 "which", name)[0].chop end def selinux_context(name) ctx = (Open3.capture2 "stat", which(name)).first.match(/Context: (.*)/) if ctx.instance_of Array ctx[1] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cvefixer-0.6.5 | lib/helpers.rb |
cvefixer-0.6.4 | lib/helpers.rb |