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 {
315315 validating: projectRoot. appendingPathComponent ( " .build " ) . appendingPathComponent ( " index-build " ) . filePath
316316 )
317317 } 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+ )
319322 {
320323 location. scratchDirectory = scratchDirectoryPath
321324 }
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ final class SwiftPMBuildSystemTests: XCTestCase {
9292
9393 func testRelativeScratchPath( ) async throws {
9494 try await withTestScratchDir { tempDir in
95- try localFileSystem . createFiles (
95+ try FileManager . default . createFiles (
9696 root: tempDir,
9797 files: [
9898 " pkg/Sources/lib/a.swift " : " " ,
@@ -122,8 +122,8 @@ final class SwiftPMBuildSystemTests: XCTestCase {
122122 )
123123
124124 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) )
127127 }
128128 }
129129
You can’t perform that action at this time.
0 commit comments