Getting a Segmentation fault: 11 with Swift 5.2 when using FileManager.default.currentDirectoryPath
Turns out that in this case, the problem was in rogue overlay dylibs that were in place because I've been using SwiftGen.
The solution is to either uninstall SwiftGen by calling
brew uninstall swiftgen
or following Nikolaj's answer from Swift bug tracking system by reinstalling SwiftGen with
--build-from-source
option and removing the dylibs from "lib" folder.