File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Sources/BuildSystemIntegration
Tests/BuildSystemIntegrationTests Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -315,7 +315,10 @@ package actor SwiftPMBuildSystem: BuiltInBuildSystem {
315
315
validating: projectRoot. appendingPathComponent ( " .build " ) . appendingPathComponent ( " index-build " ) . filePath
316
316
)
317
317
} else if let scratchDirectory = options. swiftPMOrDefault. scratchPath,
318
- let scratchDirectoryPath = try ? AbsolutePath ( validating: scratchDirectory, relativeTo: AbsolutePath ( projectRoot) )
318
+ let scratchDirectoryPath = try ? AbsolutePath (
319
+ validating: scratchDirectory,
320
+ relativeTo: AbsolutePath ( validating: projectRoot. filePath)
321
+ )
319
322
{
320
323
location. scratchDirectory = scratchDirectoryPath
321
324
}
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ final class SwiftPMBuildSystemTests: XCTestCase {
92
92
93
93
func testRelativeScratchPath( ) async throws {
94
94
try await withTestScratchDir { tempDir in
95
- try localFileSystem . createFiles (
95
+ try FileManager . default . createFiles (
96
96
root: tempDir,
97
97
files: [
98
98
" pkg/Sources/lib/a.swift " : " " ,
@@ -122,8 +122,8 @@ final class SwiftPMBuildSystemTests: XCTestCase {
122
122
)
123
123
124
124
let dataPath = await swiftpmBuildSystem. destinationBuildParameters. dataPath
125
- let expectedScratchPath = packageRoot. appending ( component : try XCTUnwrap ( options. swiftPMOrDefault. scratchPath) )
126
- XCTAssertTrue ( AbsolutePath ( dataPath) . isDescendant ( of: expectedScratchPath) )
125
+ let expectedScratchPath = packageRoot. appendingPathComponent ( try XCTUnwrap ( options. swiftPMOrDefault. scratchPath) )
126
+ XCTAssertTrue ( dataPath. asURL . isDescendant ( of: expectedScratchPath) )
127
127
}
128
128
}
129
129
You can’t perform that action at this time.
0 commit comments