mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2026-03-18 20:02:25 +00:00
Select the first runnable target (#957)
* Select the first runnable target, if there is one Instead of just selecting the first target as the scheme target, instead search for and select the first runnable target. If there are no runnables found, then select the first target. * update docs
This commit is contained in:
@@ -165,7 +165,8 @@ public class SchemeGenerator {
|
||||
if let targetName = scheme.run?.executable {
|
||||
schemeTarget = project.getTarget(targetName)
|
||||
} else {
|
||||
schemeTarget = target ?? project.getTarget(scheme.build.targets.first!.target.name)
|
||||
let name = scheme.build.targets.first { $0.buildTypes.contains(.running) }?.target.name ?? scheme.build.targets.first!.target.name
|
||||
schemeTarget = target ?? project.getTarget(name)
|
||||
}
|
||||
|
||||
let shouldExecuteOnLaunch = schemeTarget?.shouldExecuteOnLaunch == true
|
||||
|
||||
Reference in New Issue
Block a user