Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed command line parsing using default arguments.

The problem was in using the first cmd line argument which is path to executable. This is correctly used now.
  • Loading branch information...
commit aac9cf40de3f1fffee284fb6f05b06d20f533709 1 parent 3fa1fde
@tomaz authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  GBCli/src/GBCommandLineParser.m
View
3  GBCli/src/GBCommandLineParser.m
@@ -93,8 +93,9 @@ - (void)registerSwitch:(NSString *)longOption {
- (BOOL)parseOptionsUsingDefaultArgumentsWithBlock:(GBCommandLineParseBlock)handler {
NSProcessInfo *processInfo = [NSProcessInfo processInfo];
- NSArray *arguments = [processInfo arguments];
NSString *command = [processInfo processName];
+ NSMutableArray *arguments = [[processInfo arguments] mutableCopy];
+ [arguments removeObjectAtIndex:0];
return [self parseOptionsWithArguments:arguments commandLine:command block:handler];
}
Please sign in to comment.
Something went wrong with that request. Please try again.