mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Allow scratchPath to be relative paths
Interpret it as relative to the project root directory if it's a relative path.
This commit is contained in:
@@ -324,7 +324,7 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
|
||||
if options.backgroundIndexingOrDefault {
|
||||
location.scratchDirectory = AbsolutePath(projectRoot.appending(components: ".build", "index-build"))
|
||||
} else if let scratchDirectory = options.swiftPMOrDefault.scratchPath,
|
||||
let scratchDirectoryPath = try? AbsolutePath(validating: scratchDirectory)
|
||||
let scratchDirectoryPath = try? AbsolutePath(validating: scratchDirectory, relativeTo: AbsolutePath(projectRoot))
|
||||
{
|
||||
location.scratchDirectory = scratchDirectoryPath
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user