1
0
mirror of https://github.com/golang/go synced 2024-09-29 16:24:28 -06:00

runtime/cgo: ignore missing Info.plist files on iOS

When running Go programs on Corellium virtual iPhones, the Info.plist
files might not exist. Ignore the error.

Updates #31722

Change-Id: Id2e315c09346b69dda9e10cf29fb5dba6743aac4
Reviewed-on: https://go-review.googlesource.com/c/go/+/174202
Run-TryBot: Elias Naur <mail@eliasnaur.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Elias Naur 2019-04-28 09:05:16 +02:00
parent 06c9ccdfc7
commit 6ee8324388
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ init_working_dir()
}
CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
if (url_ref == NULL) {
fprintf(stderr, "runtime/cgo: no Info.plist URL\n");
// No Info.plist found. It can happen on Corellium virtual devices.
return;
}
CFStringRef url_str_ref = CFURLGetString(url_ref);

View File

@ -105,7 +105,7 @@ init_working_dir()
}
CFURLRef url_ref = CFBundleCopyResourceURL(bundle, CFSTR("Info"), CFSTR("plist"), NULL);
if (url_ref == NULL) {
fprintf(stderr, "runtime/cgo: no Info.plist URL\n");
// No Info.plist found. It can happen on Corellium virtual devices.
return;
}
CFStringRef url_str_ref = CFURLGetString(url_ref);