Sha256: d5a29ca945617e466dab96cb380812c1de2d77af407901ac32cf0f5ebac2d0fc
Contents?: true
Size: 481 Bytes
Versions: 2
Compression:
Stored size: 481 Bytes
Contents
module Sprinkle module Verifiers module Executable Sprinkle::Verify.register(Sprinkle::Verifiers::Executable) def has_executable(path) # Be smart: If the path includes a forward slash, we're checking # an absolute path. Otherwise, we're checking a global executable if path.include?('/') @commands << "test -x #{path}" else @commands << "[ -n \"`which #{path}`\"]" end end end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
auser-sprinkle-0.1.5 | lib/sprinkle/verifiers/executable.rb |
mitchellh-sprinkle-0.1.5 | lib/sprinkle/verifiers/executable.rb |