Skip to content

Commit f072a47

Browse files
authored
Make Signal initializer public (#291)
Remove duplicated public Configuration initializer
1 parent b11e683 commit f072a47

3 files changed

Lines changed: 2 additions & 18 deletions

File tree

Sources/Subprocess/Configuration.swift

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,6 @@ public struct Configuration: Sendable {
6666
self.platformOptions = platformOptions
6767
}
6868

69-
public init(
70-
_ executable: Executable,
71-
arguments: Arguments = [],
72-
environment: Environment = .inherit,
73-
workingDirectory: FilePath? = nil,
74-
platformOptions: PlatformOptions = PlatformOptions()
75-
) {
76-
self.init(
77-
executable: executable,
78-
arguments: arguments,
79-
environment: environment,
80-
workingDirectory: workingDirectory,
81-
platformOptions: platformOptions
82-
)
83-
}
84-
8569
internal func run<Result, Input: InputProtocol, Output: OutputProtocol, Error: OutputProtocol>(
8670
input: consuming CreatedPipe,
8771
as inputType: Input.Type,

Sources/Subprocess/Platforms/Subprocess+Unix.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct Signal: Hashable, Sendable {
3737
/// The underlying platform-specific value for the signal.
3838
public let rawValue: Int32
3939

40-
private init(rawValue: Int32) {
40+
public init(rawValue: Int32) {
4141
self.rawValue = rawValue
4242
}
4343

Tests/SubprocessTests/UnixTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ extension SubprocessUnixTests {
259259
platformOptions.createSession = true
260260
platformOptions.teardownSequence = teardownSequence
261261
let configuration = Configuration(
262-
.path("/bin/sh"),
262+
executable: .path("/bin/sh"),
263263
// `exec` so the monitored child becomes `sleep` itself,
264264
// which dies instantly on SIGTERM/SIGKILL.
265265
arguments: ["-c", "echo ready; exec sleep 10"],

0 commit comments

Comments
 (0)