mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 09:31:20 +08:00
fix a bug in detecting dependencies where it would cause build error when passed non-flat array into `app.files'
This commit is contained in:
@@ -258,7 +258,7 @@ EOS
|
||||
def files_dependencies(deps_hash)
|
||||
res_path = lambda do |x|
|
||||
path = /^\./.match(x) ? x : File.join('.', x)
|
||||
unless @files.include?(path)
|
||||
unless @files.flatten.include?(path)
|
||||
App.fail "Can't resolve dependency `#{x}'"
|
||||
end
|
||||
path
|
||||
@@ -292,7 +292,7 @@ EOS
|
||||
|
||||
def ordered_build_files
|
||||
@ordered_build_files ||= begin
|
||||
flat_deps = @files.map { |file| file_dependencies(file) }.flatten
|
||||
flat_deps = @files.flatten.map { |file| file_dependencies(file) }.flatten
|
||||
paths = flat_deps.dup
|
||||
flat_deps.each do |path|
|
||||
n = paths.count(path)
|
||||
|
||||
Reference in New Issue
Block a user