Skip to content

Commit 627c902

Browse files
committed
Don't swallow the pull error by mistake
Fixes #149
1 parent 4327f69 commit 627c902

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Classes/Views/PBGitXMessageSheet.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,11 @@ + (void)beginSheetWithError:(NSError *)error
8181
if (taskError && taskError.domain == PBTaskErrorDomain) {
8282
[messageParts addObject:NSLocalizedString(@"The underlying task failed:", @"PBGitXMessageSheet - task failed header")];
8383
if (taskError.code == PBTaskNonZeroExitCodeError) {
84-
NSString *message = NSLocalizedString(@"Return code: %d", @"PBGitXMessageSheet - task return code header");
84+
NSString *message = NSLocalizedString(@"Return code: %@", @"PBGitXMessageSheet - task return code header");
8585
message = [NSString stringWithFormat:message, taskError.userInfo[PBTaskTerminationStatusKey]];
8686
[messageParts addObject:message];
8787
message = NSLocalizedString(@"Output:", @"PBGitXMessageSheet - task output header");
88+
message = [message stringByAppendingString:@"\n"];
8889
message = [message stringByAppendingString:taskError.userInfo[PBTaskTerminationOutputKey]];
8990
[messageParts addObject:message];
9091
} else {

Classes/git/PBGitRepository.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ - (BOOL)pullBranch:(PBGitRef *)branchRef fromRemote:(PBGitRef *)remoteRef rebase
742742

743743
PBTask *task = [self taskWithArguments:arguments];
744744
NSError *taskError = nil;
745-
BOOL success = [task launchTask:error];
745+
BOOL success = [task launchTask:&taskError];
746746
if (!success) {
747747
NSString *desc = NSLocalizedString(@"Pull failed", @"PBGitRepository - pull error description");
748748
NSString *reason = [NSString stringWithFormat:NSLocalizedString(@"An error occurred while pulling remote \"%@\" to \"%@\".", @"PBGitRepostory - pull error reason"), remoteName, branchRef.shortName];

0 commit comments

Comments
 (0)