Skip to content

Commit

Permalink
Fix interpreter flags for manifests using pre-release tools-version
Browse files Browse the repository at this point in the history
`self.currentToolsVersion >= manifestToolsVersion` will always be true when using the 999.0 tools-version, so also accept a higher tools-version if we're in development mode.
  • Loading branch information
neonichu committed Jun 2, 2023
1 parent 30306df commit ee6a379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Workspace/Workspace.swift
Expand Up @@ -1951,7 +1951,7 @@ extension Workspace {
let manifestPath = try ManifestLoader.findManifest(packagePath: packagePath, fileSystem: self.fileSystem, currentToolsVersion: self.currentToolsVersion)
let manifestToolsVersion = try ToolsVersionParser.parse(manifestPath: manifestPath, fileSystem: self.fileSystem)

guard self.currentToolsVersion >= manifestToolsVersion, manifestToolsVersion >= ToolsVersion.minimumRequired else {
guard self.currentToolsVersion >= manifestToolsVersion || SwiftVersion.current.isDevelopment, manifestToolsVersion >= ToolsVersion.minimumRequired else {
throw StringError("invalid tools version")
}
return manifestLoader.interpreterFlags(for: manifestToolsVersion)
Expand Down

0 comments on commit ee6a379

Please sign in to comment.