Fix symlinks not fully cleaned up in Node.js tests (#349)

`FileSystem.isDirectory` returns `false` when running it on broken symlinks, which breaks Node.js tests flow. We should be able to clean up all symlinks, even broken ones. Other we can't create new correct symlinks because broken symlinks already exist at those paths.
This commit is contained in:
Max Desiatov 2022-05-23 10:37:12 +01:00 committed by GitHub
parent 8130899628
commit b5680cbfb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ public extension FileSystem {
func resourcesDirectoryNames(relativeTo buildDirectory: AbsolutePath) throws -> [String] {
try getDirectoryContents(buildDirectory).filter {
$0.hasSuffix(".resources") && isDirectory(buildDirectory.appending(component: $0))
$0.hasSuffix(".resources")
}
}
}