File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -416,10 +416,10 @@ public final class Process: ObjectIdentifierProtocol {
416
416
pendingLock. withLock {
417
417
if let stderr = pending {
418
418
self . stateLock. withLock {
419
- self ? . state = . outputReady( stdout: . success( contents) , stderr: . success( stderr) )
419
+ self . state = . outputReady( stdout: . success( contents. withUnsafeBytes { Array < UInt8 > ( $0 ) } ) , stderr: . success( stderr) )
420
420
}
421
421
} else {
422
- pending = contents
422
+ pending = contents. withUnsafeBytes { Array < UInt8 > ( $0 ) }
423
423
}
424
424
}
425
425
}
@@ -429,10 +429,10 @@ public final class Process: ObjectIdentifierProtocol {
429
429
pendingLock. withLock {
430
430
if let stdout = pending {
431
431
self . stateLock. withLock {
432
- self ? . state = . outputReady( stdout: . success( stdout) , stderr: . success( contents) )
432
+ self . state = . outputReady( stdout: . success( stdout) , stderr: . success( contents. withUnsafeBytes { Array < UInt8 > ( $0 ) } ) )
433
433
}
434
434
} else {
435
- pending = contents
435
+ pending = contents. withUnsafeBytes { Array < UInt8 > ( $0 ) }
436
436
}
437
437
}
438
438
}
You can’t perform that action at this time.
0 commit comments