We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de305e1 commit fadbf2eCopy full SHA for fadbf2e
swift-tools-support-core/Sources/TSCUtility/Netrc.swift
@@ -45,9 +45,7 @@ public struct Netrc: AuthorizationProviding {
45
/// - Returns: `Netrc` container with parsed connection settings, or error
46
public static func load(fromFileAtPath filePath: AbsolutePath? = nil) -> Result<Netrc, Netrc.Error> {
47
48
- guard let filePath = filePath ?? AbsolutePath("\(NSHomeDirectory())/.netrc") else {
49
- return .failure(.invalidFilePath)
50
- }
+ let filePath = filePath ?? AbsolutePath("\(NSHomeDirectory())/.netrc")
51
52
guard FileManager.default.fileExists(atPath: filePath.pathString) else { return .failure(.fileNotFound(filePath)) }
53
guard FileManager.default.isReadableFile(atPath: filePath.pathString),
0 commit comments