Skip to content

Commit 28deb36

Browse files
committed
fixup
1 parent 53dba6c commit 28deb36

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/Workspace/UserToolchain.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,12 @@ public final class UserToolchain: Toolchain {
432432

433433
let applicationPath = destination.binDir
434434

435+
// this is the normal case when using the toolchain
436+
let librariesPath = applicationPath.parentDirectory.appending(components: "lib", "swift", "pm")
437+
if localFileSystem.exists(librariesPath) {
438+
return .init(root: librariesPath)
439+
}
440+
435441
// this tests if we are debugging / testing SwiftPM with Xcode
436442
let manifestFrameworksPath = applicationPath.appending(components: "PackageFrameworks", "PackageDescription.framework")
437443
let pluginFrameworksPath = applicationPath.appending(components: "PackageFrameworks", "PackagePlugin.framework")
@@ -450,12 +456,6 @@ public final class UserToolchain: Toolchain {
450456
)
451457
}
452458

453-
// this tests if we are debugging / testing SwiftPM with CMake / bootstrap
454-
let cmakeLibrariesPath = applicationPath.parentDirectory.appending(components: "lib", "swift", "pm")
455-
if localFileSystem.exists(cmakeLibrariesPath) {
456-
return .init(root: cmakeLibrariesPath)
457-
}
458-
459459
// default case - no custom location which will use the one from the toolchain
460460
return nil
461461
}

0 commit comments

Comments
 (0)