Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PBGitRepository: Add support for changing the environment when execut…

…ing commands
  • Loading branch information...
commit aa43e18d619ee45d926afafcb4cb2935b8810751 1 parent b382b34
Pieter de Bie authored
Showing with 14 additions and 1 deletion.
  1. +3 −0  PBGitRepository.h
  2. +11 −1 PBGitRepository.m
3  PBGitRepository.h
View
@@ -33,6 +33,9 @@ extern NSString* PBGitRepositoryErrorDomain;
- (NSString*) outputForCommand:(NSString*) cmd;
- (NSString *)outputForCommand:(NSString *)str retValue:(int *)ret;
- (NSString *)outputForArguments:(NSArray *)arguments inputString:(NSString *)input retValue:(int *)ret;
+- (NSString *)outputForArguments:(NSArray *)arguments inputString:(NSString *)input byExtendingEnvironment:(NSDictionary *)dict retValue:(int *)ret;
+
+
- (NSString*) outputForArguments:(NSArray*) args;
- (NSString*) outputForArguments:(NSArray*) args retValue:(int *)ret;
- (NSString *)outputInWorkdirForArguments:(NSArray*) arguments;
12 PBGitRepository.m
View
@@ -384,7 +384,7 @@ - (NSString*) outputForArguments:(NSArray *)arguments retValue:(int *)ret
return [PBEasyPipe outputForCommand:[PBGitBinary path] withArgs:arguments inDir: self.fileURL.path retValue: ret];
}
-- (NSString*) outputForArguments:(NSArray *)arguments inputString:(NSString *)input retValue:(int *)ret;
+- (NSString*) outputForArguments:(NSArray *)arguments inputString:(NSString *)input retValue:(int *)ret
{
return [PBEasyPipe outputForCommand:[PBGitBinary path]
withArgs:arguments
@@ -393,6 +393,16 @@ - (NSString*) outputForArguments:(NSArray *)arguments inputString:(NSString *)in
retValue: ret];
}
+- (NSString *)outputForArguments:(NSArray *)arguments inputString:(NSString *)input byExtendingEnvironment:(NSDictionary *)dict retValue:(int *)ret
+{
+ return [PBEasyPipe outputForCommand:[PBGitBinary path]
+ withArgs:arguments
+ inDir:[self workingDirectory]
+ byExtendingEnvironment:dict
+ inputString:input
+ retValue: ret];
+}
+
- (BOOL)executeHook:(NSString *)name output:(NSString **)output
{
return [self executeHook:name withArgs:[NSArray array] output:output];
Please sign in to comment.
Something went wrong with that request. Please try again.