Skip to content

Commit 281bda7

Browse files
committed
Return swiftly bin path, even in tests
1 parent 08dcfaa commit 281bda7

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Sources/SwiftlyCore/Platform.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ extension Platform {
328328
// Find the location where swiftly should be executed.
329329
public func findSwiftlyBin(_ ctx: SwiftlyCoreContext) throws -> String? {
330330
let swiftlyHomeBin = self.swiftlyBinDir(ctx).appendingPathComponent("swiftly", isDirectory: false).path
331-
332331
// First, let's find out where we are.
333332
let cmd = CommandLine.arguments[0]
334333
let cmdAbsolute = if cmd.hasPrefix("/") {
@@ -353,11 +352,6 @@ extension Platform {
353352
return cmdAbsolute
354353
}
355354

356-
// If we're running inside an xctest then we don't have a location for this swiftly.
357-
guard let cmdAbsolute, !cmdAbsolute.hasSuffix("xctest") else {
358-
return nil
359-
}
360-
361355
return FileManager.default.fileExists(atPath: swiftlyHomeBin) ? swiftlyHomeBin : nil
362356
}
363357

0 commit comments

Comments
 (0)