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 = ""
22
22
/// - Parameters:
23
23
/// - path: Absolute path to the executable.
24
24
/// - args: The executable arguments.
25
- public func exec( path: String , args: [ String ] ) throws {
25
+ public func exec( path: String , args: [ String ] ) throws -> Never {
26
26
let cArgs = CStringArray ( args)
27
27
#if os(Windows)
28
28
guard cArgs. cArray. withUnsafeBufferPointer ( {
@@ -38,6 +38,13 @@ public func exec(path: String, args: [String]) throws {
38
38
throw SystemError . exec ( errno, path: path, args: args)
39
39
}
40
40
#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)
41
48
}
42
49
43
50
// MARK: TSCUtility function for searching for executables
You can’t perform that action at this time.
0 commit comments