Files
SwiftLint/Source/SwiftLintFramework/ExitHelper.swift
T
Danny Mösch 246643fe55 Keep only command-line related functions in swiftlint module (#5806)
Swift 6 doesn't allow importing executable targets. So we need to
move testable logic into a framework.
2024-09-29 17:23:46 +02:00

13 lines
227 B
Swift

#if os(Linux)
import Glibc
#endif
package enum ExitHelper {
package static func successfullyExit() {
#if os(Linux)
// Workaround for https://github.com/apple/swift/issues/59961
Glibc.exit(0)
#endif
}
}