diff --git a/Sources/TSCBasic/FileSystem.swift b/Sources/TSCBasic/FileSystem.swift index 69e39e89..8f3e4f7e 100644 --- a/Sources/TSCBasic/FileSystem.swift +++ b/Sources/TSCBasic/FileSystem.swift @@ -522,6 +522,10 @@ private struct LocalFileSystem: FileSystem { var currentWorkingDirectory: AbsolutePath? { let cwdStr = FileManager.default.currentDirectoryPath + + guard !cwdStr.isEmpty else { + return nil + } #if _runtime(_ObjC) // The ObjC runtime indicates that the underlying Foundation has ObjC