Skip to content

Commit 7f4c079

Browse files
committed
Fix Linux compile error and one failing test
1 parent 9e38d01 commit 7f4c079

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.swift-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
main-snapshot-2025-04-12

Sources/Subprocess/Configuration.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,11 @@ internal struct CreatedPipe {
871871
}
872872

873873
internal init(closeWhenDone: Bool) throws {
874+
#if os(Windows)
874875
let pipe = try FileDescriptor.ssp_pipe()
876+
#else
877+
let pipe = try FileDescriptor.pipe()
878+
#endif
875879

876880
self.readFileDescriptor = .init(
877881
pipe.readEnd,

Tests/SubprocessTests/SubprocessTests+Unix.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ extension SubprocessUnixTests {
729729
var platformOptions = PlatformOptions()
730730
platformOptions.supplementaryGroups = Array(expectedGroups)
731731
let idResult = try await Subprocess.run(
732-
.name("/usr/bin/swift"),
732+
.name("swift"),
733733
arguments: [getgroupsSwift.string],
734734
platformOptions: platformOptions,
735735
output: .string

0 commit comments

Comments
 (0)