Skip to content

Commit 5fa12e0

Browse files
committed
Fix a problem compiling the extension when not in debug mode; unlike PackageDescription, which needs either 4 or 4_2 appended to the path, there is no need for that for PackageExtension.
1 parent e074052 commit 5fa12e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/Workspace/DefaultExtensionRunner.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public struct DefaultExtensionRunner: ExtensionRunner {
4444
// FIXME: Much of this is copied from the ManifestLoader and should be consolidated.
4545

4646
// Bin dir will be set when developing swiftpm without building all of the runtimes.
47-
let runtimePath = resources.binDir ?? resources.libDir.appending(toolsVersion.runtimeSubpath)
47+
let runtimePath = resources.binDir ?? resources.libDir
4848

4949
// Compile the package extension script.
5050
var command = [resources.swiftCompiler.pathString]
@@ -116,7 +116,7 @@ public struct DefaultExtensionRunner: ExtensionRunner {
116116
let output = try (result.utf8Output() + result.utf8stderrOutput()).spm_chuzzle() ?? ""
117117
if result.exitStatus != .terminated(code: 0) {
118118
// TODO: Make this a proper error.
119-
throw StringError("failed to compile package extension: \(output)")
119+
throw StringError("failed to compile package extension:\n\(command)\n\n\(output)")
120120
}
121121

122122
return compiledExec

0 commit comments

Comments
 (0)