Added verbose logging to copy_xcode_path_for
This commit is contained in:
parent
4d4735e505
commit
01f8e09b31
12
ios-deploy.c
12
ios-deploy.c
@ -325,6 +325,9 @@ CFStringRef copy_xcode_path_for(CFStringRef subPath, CFStringRef search) {
|
|||||||
if (!found) {
|
if (!found) {
|
||||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@/%@"), xcodeDevPath, subPath, search);
|
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@/%@"), xcodeDevPath, subPath, search);
|
||||||
found = path_exists(path);
|
found = path_exists(path);
|
||||||
|
if (verbose && !found) {
|
||||||
|
NSLog(@"copy_xcode_path_for path not found: %@", path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Try find `xcode-select --print-path` with search as a name pattern
|
// Try find `xcode-select --print-path` with search as a name pattern
|
||||||
if (!found) {
|
if (!found) {
|
||||||
@ -335,16 +338,25 @@ CFStringRef copy_xcode_path_for(CFStringRef subPath, CFStringRef search) {
|
|||||||
path = find_path(CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@"), xcodeDevPath, subPath), search, CFSTR(""));
|
path = find_path(CFStringCreateWithFormat(NULL, NULL, CFSTR("%@/%@"), xcodeDevPath, subPath), search, CFSTR(""));
|
||||||
}
|
}
|
||||||
found = CFStringGetLength(path) > 0 && path_exists(path);
|
found = CFStringGetLength(path) > 0 && path_exists(path);
|
||||||
|
if (verbose && !found) {
|
||||||
|
NSLog(@"copy_xcode_path_for path not found: %@", path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// If not look in the default xcode location (xcode-select is sometimes wrong)
|
// If not look in the default xcode location (xcode-select is sometimes wrong)
|
||||||
if (!found) {
|
if (!found) {
|
||||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Applications/Xcode.app/Contents/Developer/%@&%@"), subPath, search);
|
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("/Applications/Xcode.app/Contents/Developer/%@&%@"), subPath, search);
|
||||||
found = path_exists(path);
|
found = path_exists(path);
|
||||||
|
if (verbose && !found) {
|
||||||
|
NSLog(@"copy_xcode_path_for path not found: %@", path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// If not look in the users home directory, Xcode can store device support stuff there
|
// If not look in the users home directory, Xcode can store device support stuff there
|
||||||
if (!found) {
|
if (!found) {
|
||||||
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s/Library/Developer/Xcode/%@/%@"), home, subPath, search);
|
path = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s/Library/Developer/Xcode/%@/%@"), home, subPath, search);
|
||||||
found = path_exists(path);
|
found = path_exists(path);
|
||||||
|
if (verbose && !found) {
|
||||||
|
NSLog(@"copy_xcode_path_for path not found: %@", path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CFRelease(xcodeDevPath);
|
CFRelease(xcodeDevPath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user