File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,6 @@ private extension Process {
418
418
let errorPipe = Pipe ( )
419
419
standardError = errorPipe
420
420
421
- #if !os(Linux)
422
421
outputPipe. fileHandleForReading. readabilityHandler = { handler in
423
422
let data = handler. availableData
424
423
outputQueue. async {
@@ -434,21 +433,13 @@ private extension Process {
434
433
errorHandle? . write ( data)
435
434
}
436
435
}
437
- #endif
438
436
439
437
#if os(Linux)
440
438
try run ( )
441
439
#else
442
440
launch ( )
443
441
#endif
444
442
445
- #if os(Linux)
446
- outputQueue. sync {
447
- outputData = outputPipe. fileHandleForReading. readDataToEndOfFile ( )
448
- errorData = errorPipe. fileHandleForReading. readDataToEndOfFile ( )
449
- }
450
- #endif
451
-
452
443
waitUntilExit ( )
453
444
454
445
if let handle = outputHandle, !handle. isStandard {
@@ -459,10 +450,8 @@ private extension Process {
459
450
handle. closeFile ( )
460
451
}
461
452
462
- #if !os(Linux)
463
453
outputPipe. fileHandleForReading. readabilityHandler = nil
464
454
errorPipe. fileHandleForReading. readabilityHandler = nil
465
- #endif
466
455
467
456
// Block until all writes have occurred to outputData and errorData,
468
457
// and then read the data back out.
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ class ShellOutTests: XCTestCase {
71
71
}
72
72
73
73
func testSingleCommandAtPathContainingTilde( ) throws {
74
- let homeContents = try shellOut ( to: " ls " . checked, at: " ~ " )
74
+ let homeContents = try shellOut ( to: " ls " . checked, arguments : [ " -a " ] , at: " ~ " )
75
75
XCTAssertFalse ( homeContents. isEmpty)
76
76
}
77
77
You can’t perform that action at this time.
0 commit comments