File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -6623,13 +6623,16 @@ final class SwiftDriverTests: XCTestCase {
6623
6623
let jobs = try driver. planBuild ( )
6624
6624
XCTAssertEqual ( jobs. count, 1 )
6625
6625
let defaultSwiftFrontend = jobs. first!. tool. absolutePath!
6626
+ let originalWorkingDirectory = localFileSystem. currentWorkingDirectory!
6626
6627
6627
6628
try withTemporaryDirectory { toolsDirectory in
6628
6629
let customSwiftFrontend = toolsDirectory. appending ( component: executableName ( " swift-frontend " ) )
6629
6630
try localFileSystem. createSymbolicLink ( customSwiftFrontend, pointingAt: defaultSwiftFrontend, relative: false )
6630
6631
6631
6632
try withTemporaryDirectory { tempDirectory in
6632
6633
try localFileSystem. changeCurrentWorkingDirectory ( to: tempDirectory)
6634
+ defer { try ! localFileSystem. changeCurrentWorkingDirectory ( to: originalWorkingDirectory) }
6635
+
6633
6636
let anotherSwiftFrontend = localFileSystem. currentWorkingDirectory!. appending ( component: executableName ( " swift-frontend " ) )
6634
6637
try localFileSystem. createSymbolicLink ( anotherSwiftFrontend, pointingAt: defaultSwiftFrontend, relative: false )
6635
6638
You can’t perform that action at this time.
0 commit comments