mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Fix duplicate projects.
This commit is contained in:
parent
ccdfceceea
commit
c069483490
1 changed files with 2 additions and 2 deletions
|
@ -91,7 +91,7 @@ class TaskManager @Inject constructor(val args: Args,
|
|||
fun findProjectsToRun(taskInfos: List<TaskInfo>, projects: List<Project>) : List<Project> {
|
||||
|
||||
// Validate projects
|
||||
val result = arrayListOf<Project>()
|
||||
val result = LinkedHashSet<Project>()
|
||||
val projectMap = HashMap<String, Project>().apply {
|
||||
projects.forEach { put(it.name, it)}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ class TaskManager @Inject constructor(val args: Args,
|
|||
}
|
||||
|
||||
// If at least one task didn't specify a project, run them all
|
||||
return if (result.any()) result else projects
|
||||
return if (result.any()) result.toList() else projects
|
||||
}
|
||||
|
||||
private fun runProjects(taskInfos: List<TaskInfo>, projects: List<Project>) : RunTargetResult {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue