diff --git a/Ample/LogWindowController.m b/Ample/LogWindowController.m index d7d53d5..7843658 100644 --- a/Ample/LogWindowController.m +++ b/Ample/LogWindowController.m @@ -86,6 +86,13 @@ static NSMutableSet *LogWindows; } } +-(void)appendAttributedString: (NSAttributedString *)string { + + if ([string length]) { + [[_textView textStorage] appendAttributedString: string]; + } +} + -(NSError *)runTask: (NSTask *)task { @@ -109,8 +116,8 @@ static NSMutableSet *LogWindows; [task launchAndReturnError: &error]; if (error) { NSLog(@"NSTask error. Path = %s error = %@", path, error); + return error; } - return error; } else { path = [[task launchPath] fileSystemRepresentation]; wd = [[task currentDirectoryPath] fileSystemRepresentation];