Skip to content

Commit d6792a2

Browse files
committed
[5.5] Extend the availability annotations for the Netrc support to cover all the Darwin platforms (#218)
This extends the availability based on the version numbers in the annotation for `NSTextCheckingResult.range(withName name: String) -> NSRange`. Otherwise, ToolsSupportCore can no longer build on for example iOS, because the default minimum deployment targets for the various platforms are really old (e.g. iOS 9). (cherry picked from commit d6c996e)
1 parent 435a270 commit d6792a2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Sources/TSCUtility/Netrc.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ extension AuthorizationProviding {
2424
#if os(macOS)
2525
/*
2626
Netrc feature depends upon `NSTextCheckingResult.range(withName name: String) -> NSRange`,
27-
which is only available in macOS 10.13+ at this time.
27+
which is only available in macOS 10.13+, iOS 11+, etc at this time.
2828
*/
29-
@available (OSX 10.13, *)
29+
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
3030
/// Container of parsed netrc connection settings
3131
public struct Netrc: AuthorizationProviding {
3232
/// Representation of `machine` connection settings & `default` connection settings.
@@ -97,7 +97,7 @@ public struct Netrc: AuthorizationProviding {
9797
}
9898
}
9999

100-
@available (OSX 10.13, *)
100+
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
101101
public extension Netrc {
102102
enum Error: Swift.Error {
103103
case invalidFilePath
@@ -135,14 +135,14 @@ public extension Netrc {
135135
}
136136
}
137137

138-
@available (OSX 10.13, *)
138+
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
139139
extension Netrc.Error: CustomNSError {
140140
public var errorUserInfo: [String : Any] {
141141
return [NSLocalizedDescriptionKey: "\(self)"]
142142
}
143143
}
144144

145-
@available (OSX 10.13, *)
145+
@available (macOS 10.13, iOS 11, tvOS 11, watchOS 4, *)
146146
fileprivate enum RegexUtil {
147147
@frozen fileprivate enum Token: String, CaseIterable {
148148
case machine, login, password, account, macdef, `default`

0 commit comments

Comments
 (0)