Skip to content

Commit 5b0e9a8

Browse files
authored
Merge pull request #71 from apple/filesystem-throw-unsupported
[FileSystem] Throw "unsupported" rather than fatalError()'ing
2 parents cceb982 + 3193425 commit 5b0e9a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/TSCBasic/FileSystem.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ public extension FileSystem {
238238
}
239239

240240
func getFileInfo(_ path: AbsolutePath) throws -> FileInfo {
241-
fatalError("This file system currently doesn't support this method")
241+
throw FileSystemError.unsupported
242242
}
243243
}
244244

@@ -578,7 +578,7 @@ public class InMemoryFileSystem: FileSystem {
578578
}
579579

580580
public func changeCurrentWorkingDirectory(to path: AbsolutePath) throws {
581-
fatalError("Unsupported")
581+
throw FileSystemError.unsupported
582582
}
583583

584584
public var homeDirectory: AbsolutePath {
@@ -812,7 +812,7 @@ public class RerootedFileSystemView: FileSystem {
812812
}
813813

814814
public func changeCurrentWorkingDirectory(to path: AbsolutePath) throws {
815-
fatalError("Unsupported")
815+
throw FileSystemError.unsupported
816816
}
817817

818818
public var homeDirectory: AbsolutePath {

0 commit comments

Comments
 (0)