Skip to content

Commit

Permalink
Prioritize using the Xcode path set in the DEVELOPER_DIR environment …
Browse files Browse the repository at this point in the history
…variable when available. (ios-control#533)
  • Loading branch information
ivanhernandez13 authored and Ivan Hernandez committed Sep 4, 2021
1 parent 4f88105 commit c3e6e7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ios-deploy/ios-deploy.m
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ CFStringRef copy_xcode_dev_path(void) {
if (strlen(xcode_dev_path) == 0) {
const char* env_dev_path = getenv("DEVELOPER_DIR");

if (env_dev_path) {
if (env_dev_path && strlen(env_dev_path) > 0) {
strcpy(xcode_dev_path, env_dev_path);
} else {
FILE *fpipe = NULL;
Expand All @@ -333,6 +333,7 @@ CFStringRef copy_xcode_dev_path(void) {
strtok(buffer, "\n");
strcpy(xcode_dev_path, buffer);
}
NSLogVerbose(@"Found Xcode developer dir %s", xcode_dev_path);
}
return CFStringCreateWithCString(NULL, xcode_dev_path, kCFStringEncodingUTF8);
}
Expand Down

0 comments on commit c3e6e7d

Please sign in to comment.