File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public let executableFileSuffix = ""
2222/// - Parameters:
2323/// - path: Absolute path to the executable.
2424/// - args: The executable arguments.
25- public func exec( path: String , args: [ String ] ) throws {
25+ public func exec( path: String , args: [ String ] ) throws -> Never {
2626 let cArgs = CStringArray ( args)
2727 #if os(Windows)
2828 guard cArgs. cArray. withUnsafeBufferPointer ( {
@@ -38,6 +38,13 @@ public func exec(path: String, args: [String]) throws {
3838 throw SystemError . exec ( errno, path: path, args: args)
3939 }
4040 #endif
41+ fatalError ( " unreachable " )
42+ }
43+
44+ @_disfavoredOverload
45+ @available ( * , deprecated, message: " Use the overload which returns Never " )
46+ public func exec( path: String , args: [ String ] ) throws {
47+ try exec ( path: path, args: args)
4148}
4249
4350// MARK: TSCUtility function for searching for executables
You can’t perform that action at this time.
0 commit comments