From 85909e50b377a23eb3eb197bb947d9869297dc7b Mon Sep 17 00:00:00 2001 From: Kent Sutherland Date: Sun, 11 Feb 2018 14:22:35 -0600 Subject: [PATCH] Remove extra calls to readDataToEndOfFile that were causing exceptions --- Classes/Util/PBTask.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/Classes/Util/PBTask.m b/Classes/Util/PBTask.m index d2f457f7..1d33061c 100644 --- a/Classes/Util/PBTask.m +++ b/Classes/Util/PBTask.m @@ -116,7 +116,6 @@ - (void)performTaskOnQueue:(dispatch_queue_t)queue terminationHandler:(void (^)( PBTaskLog(@"task %p: exit != 0", weakSelf); - [(NSMutableData *)weakSelf.standardOutputData appendData:[[task.standardOutput fileHandleForReading] readDataToEndOfFile]]; NSString *outputString = [[NSString alloc] initWithData:weakSelf.standardOutputData encoding:NSUTF8StringEncoding]; weakSelf.standardOutputData = nil; @@ -189,7 +188,6 @@ - (void)performTaskOnQueue:(dispatch_queue_t)queue completionHandler:(void (^)(N @synchronized (self) { PBTaskLog(@"task %p: completed, removing read handler", self); [self.task.standardOutput fileHandleForReading].readabilityHandler = nil; - [(NSMutableData *)self.standardOutputData appendData:[[self.task.standardOutput fileHandleForReading] readDataToEndOfFile]]; } completionHandler(self.standardOutputData, nil);