Only directories are candidates for superenv bin

This commit is contained in:
Jack Nagel 2014-04-22 15:38:59 -05:00
parent 722a5af4eb
commit 6cdc76452b
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ require 'extend/ENV/std'
require 'extend/ENV/super' require 'extend/ENV/super'
def superenv? def superenv?
Superenv.bin && Superenv.bin.directory? && ARGV.env != "std" Superenv.bin && ARGV.env != "std"
end end
module EnvActivation module EnvActivation

View File

@ -40,7 +40,7 @@ module Superenv
end end
def self.bin def self.bin
@bin ||= (HOMEBREW_REPOSITORY/"Library/ENV").children.reject{|d| d.basename.to_s > MacOS::Xcode.version }.max @bin ||= (HOMEBREW_REPOSITORY/"Library/ENV").subdirs.reject { |d| d.basename.to_s > MacOS::Xcode.version }.max
end end
def reset def reset