Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Sources/TSCUtility/Netrc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ extension AuthorizationProviding {

/*
Netrc feature depends upon `NSTextCheckingResult.range(withName name: String) -> NSRange`,
which is only available in macOS 10.13+ at this time.
which is only available in macOS 10.13+, iOS 11+, etc at this time.
*/
@available (OSX 10.13, *)
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
/// Container of parsed netrc connection settings
public struct Netrc: AuthorizationProviding {
/// Representation of `machine` connection settings & `default` connection settings.
Expand Down Expand Up @@ -88,7 +88,7 @@ public struct Netrc: AuthorizationProviding {
}
}

@available (OSX 10.13, *)
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
public extension Netrc {
enum Error: Swift.Error {
case invalidFilePath
Expand Down Expand Up @@ -126,14 +126,14 @@ public extension Netrc {
}
}

@available (OSX 10.13, *)
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
extension Netrc.Error: CustomNSError {
public var errorUserInfo: [String : Any] {
return [NSLocalizedDescriptionKey: "\(self)"]
}
}

@available (OSX 10.13, *)
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
fileprivate enum RegexUtil {
@frozen fileprivate enum Token: String, CaseIterable {
case machine, login, password, account, macdef, `default`
Expand Down