Skip to content

Commit 3555391

Browse files
committed
Revert change that prevented install tests from actually installing
1 parent d6e7e68 commit 3555391

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Sources/SwiftlyCore/Platform.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,16 @@ extension Platform {
454454
return cmdAbsolute
455455
}
456456

457+
// If we're running inside an xctest then we don't have a location for this swiftly.
458+
guard let cmdAbsolute,
459+
!(
460+
(cmdAbsolute.string.hasSuffix("xctest") || cmdAbsolute.string.hasSuffix("swiftpm-testing-helper"))
461+
&& CommandLine.arguments.contains { $0.contains("InstallTests") }
462+
)
463+
else {
464+
return nil
465+
}
466+
457467
return try await fs.exists(atPath: swiftlyHomeBin) ? swiftlyHomeBin : nil
458468
}
459469

0 commit comments

Comments
 (0)