Commit afe1078b authored by Drew's avatar Drew

Fix "index out of range" when a leaf node is skipped

parent 902c18c6
......@@ -50,8 +50,11 @@ func process(tasks: [Task], testTask: Task?, package: Package, xcodeprojGUID: St
}
if task.tool != "atllbuild" {
print("Skipping task \(task.qualifiedName) because of non-atllbuild type")
let nextTasks = Array(tasks[1..<tasks.count])
return process(tasks: nextTasks, testTask: testTask, package: package, xcodeprojGUID: xcodeprojGUID)
if tasks.count > 1 {
let nextTasks = Array(tasks[1..<tasks.count])
return process(tasks: nextTasks, testTask: testTask, package: package, xcodeprojGUID: xcodeprojGUID)
}
return []
}
guard let taskname = task["name"]?.string else { fatalError("No task name.")}
guard let sourceDescriptions = task["sources"]?.vector?.flatMap({$0.string}) else { fatalError("Can't find sources for atllbuild.") }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment