Sha256: eab8549af74e146fa978ac45c59837578a90aaa9ce09186c1ad5ad20218fd40e
Contents?: true
Size: 391 Bytes
Versions: 2
Compression:
Stored size: 391 Bytes
Contents
module EmberCLI module Helpers extend self def which(cmd) exts = ENV.fetch("PATHEXT", ?;).split(?;, -1).uniq ENV.fetch("PATH").split(File::PATH_SEPARATOR).each do |path| exts.each do |ext| exe = File.join(path, "#{cmd}#{ext}") return exe if File.executable?(exe) && !File.directory?(exe) end end nil end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ember-cli-rails-0.0.3 | lib/ember-cli/helpers.rb |
ember-cli-rails-0.0.2 | lib/ember-cli/helpers.rb |