diff options
author | elijah <elijah@riseup.net> | 2016-10-05 14:35:56 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-10-05 14:35:56 -0700 |
commit | 7abfbd6abae14fa6a72350f7b75268ff561354ee (patch) | |
tree | af5c969c905a8d2a95f2b2aa7c4dd6f4b8763126 /lib/leap_cli/path.rb | |
parent | cc57bc6c0ff99d88f3bfeff1b04297e9b91e6988 (diff) | |
parent | f95e08ef7d8defbde4a19e138b1ac4ebc9677669 (diff) |
Merge branch 'develop'
# Conflicts:
# lib/leap_cli/version.rb
Diffstat (limited to 'lib/leap_cli/path.rb')
-rw-r--r-- | lib/leap_cli/path.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/leap_cli/path.rb b/lib/leap_cli/path.rb index fd2e3fc..a78dbd2 100644 --- a/lib/leap_cli/path.rb +++ b/lib/leap_cli/path.rb @@ -3,7 +3,7 @@ require 'fileutils' module LeapCli; module Path def self.platform - @platform + @platform ||= nil end def self.provider_base @@ -40,14 +40,14 @@ module LeapCli; module Path [Path.provider, Path.provider_base].each do |base| if arg.is_a?(Symbol) || arg.is_a?(Array) named_path(arg, base).tap {|path| - return path if File.exists?(path) + return path if File.exist?(path) } else File.join(base, arg).tap {|path| - return path if File.exists?(path) + return path if File.exist?(path) } File.join(base, 'files', arg).tap {|path| - return path if File.exists?(path) + return path if File.exist?(path) } end end @@ -83,7 +83,7 @@ module LeapCli; module Path end def self.exists?(name, provider_dir=nil) - File.exists?(named_path(name, provider_dir)) + File.exist?(named_path(name, provider_dir)) end def self.defined?(name) |