Support leading ".." notation in dependency pathnames

This commit is contained in:
Jeremy Ruppel
2013-05-14 12:42:58 -07:00
committed by Watson
parent 6e07a7c746
commit 6fb9560bfb

View File

@@ -205,7 +205,7 @@ module Motion; module Project
def files_dependencies(deps_hash)
res_path = lambda do |x|
path = /^\.?\//.match(x) ? x : File.join('.', x)
path = /^\.{0,2}\//.match(x) ? x : File.join('.', x)
unless @files.flatten.include?(path)
App.fail "Can't resolve dependency `#{path}'"
end