Skip to content

Commit 907b747

Browse files
authored
enable netrc on non-darwin platforms (#210)
motivation: * netrc functionality is useful on all platforms, the regex functionality was added to non-darwin foundation * see swiftlang/swift-corelibs-foundation#1522 changes: remove platforms restructions where appropriate
1 parent 435a270 commit 907b747

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

Sources/TSCUtility/Netrc.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ extension AuthorizationProviding {
1313
}
1414
}
1515

16-
#if os(Windows)
17-
// FIXME: - add support for Windows when regex function available
18-
#endif
19-
20-
#if os(Linux)
21-
// FIXME: - add support for Linux when regex function available
22-
#endif
23-
24-
#if os(macOS)
2516
/*
2617
Netrc feature depends upon `NSTextCheckingResult.range(withName name: String) -> NSRange`,
2718
which is only available in macOS 10.13+ at this time.
@@ -168,4 +159,3 @@ fileprivate enum RegexUtil {
168159
return #"\s*\#(string)\s+(?<\#(prefix + string)>\S++)"#
169160
}
170161
}
171-
#endif

Tests/TSCUtilityTests/NetrcTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import XCTest
22
import TSCUtility
33

4-
#if os(macOS)
54
@available(macOS 10.13, *)
65
/// Netrc feature depends upon `NSTextCheckingResult.range(withName name: String) -> NSRange`,
76
/// which is only available in macOS 10.13+ at this time.
@@ -445,4 +444,4 @@ class NetrcTests: XCTestCase {
445444
XCTAssertEqual(netrc.machines[1].password, "sunshine4ever")
446445
}
447446
}
448-
#endif
447+

0 commit comments

Comments
 (0)