Ticket #41104: toolchain_xcrun.patch

File toolchain_xcrun.patch, 1.4 KB (added by stoffer@…, 11 years ago)
  • source/Categories/SysUtils.m

    old new  
    3939    NSString* relToolBase = [NSString pathWithComponents:
    4040        [NSArray arrayWithObjects: @"/", @"usr", @"bin", nil]];
    4141    NSString* relToolPath = [relToolBase stringByAppendingPathComponent: toolName];
    42     NSString* selectToolPath = [relToolBase stringByAppendingPathComponent: @"xcode-select"];
     42    NSString* selectToolPath = [relToolBase stringByAppendingPathComponent: @"xcrun"];
    4343    NSTask* selectTask = [[[NSTask alloc] init] autorelease];
    4444    NSPipe* selectPipe = [NSPipe pipe];
    45     NSArray* args = [NSArray arrayWithObject: @"--print-path"];
     45    NSArray* args = [NSArray arrayWithObjects: @"--find", toolName, nil];
    4646
    4747    [selectTask setLaunchPath: selectToolPath];
    4848    [selectTask setArguments: args];
     
    6161                                                      length: [selectData length]
    6262                                                    encoding: NSUTF8StringEncoding] autorelease];
    6363
    64     return [[absToolPath stringByTrimmingCharactersInSet:
    65         [NSCharacterSet whitespaceAndNewlineCharacterSet]]
    66         stringByAppendingPathComponent: relToolPath];
     64    return [absToolPath stringByTrimmingCharactersInSet:
     65        [NSCharacterSet whitespaceAndNewlineCharacterSet]];
    6766}
    6867
    6968@end