Skip to content

Commit 30e623f

Browse files
mikegerMichael Gerasymenko
andauthored
Remove implicit target argument when running as Xcode plugin (#33)
Co-authored-by: Michael Gerasymenko <michael.gerasymenko@tamara.co>
1 parent a441576 commit 30e623f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Plugins/SelectiveTestingPlugin/SelectiveTestingPlugin.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ struct SelectiveTestingPlugin: CommandPlugin {
4242

4343
var toolArguments = arguments
4444

45+
if let indexOfTarget = toolArguments.firstIndex(of: "--target"),
46+
indexOfTarget != (toolArguments.count - 1) {
47+
toolArguments.remove(at: indexOfTarget + 1)
48+
toolArguments.remove(at: indexOfTarget)
49+
}
50+
4551
if !toolArguments.contains(where: { $0 == "--test-plan" }),
4652
let testPlan = context.xcodeProject.filePaths.first(where: {
4753
$0.extension == "xctestplan"

0 commit comments

Comments
 (0)