mirror of https://github.com/microsoft/vcpkg.git
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
diff --git a/cli/main.c b/cli/main.c
|
|
index a1cf90e..3ab2092 100644
|
|
--- a/cli/main.c
|
|
+++ b/cli/main.c
|
|
@@ -1055,7 +1055,7 @@ unveil_search_paths(const pkgconf_client_t *client, const pkgconf_cross_personal
|
|
{
|
|
pkgconf_path_t *pn = n->data;
|
|
|
|
- if (pkgconf_unveil(pn->path, "r") == -1)
|
|
+ if (pkgconf_unveil(pn->path, "r") == -1 && errno != ENOENT)
|
|
return false;
|
|
}
|
|
|
|
@@ -1063,7 +1063,7 @@ unveil_search_paths(const pkgconf_client_t *client, const pkgconf_cross_personal
|
|
{
|
|
pkgconf_path_t *pn = n->data;
|
|
|
|
- if (pkgconf_unveil(pn->path, "r") == -1)
|
|
+ if (pkgconf_unveil(pn->path, "r") == -1 && errno != ENOENT)
|
|
return false;
|
|
}
|
|
|
|
@@ -1276,13 +1276,6 @@ main(int argc, char *argv[])
|
|
/* now, bring up the client. settings are preserved since the client is prealloced */
|
|
pkgconf_client_init(&pkg_client, error_handler, NULL, personality);
|
|
|
|
- /* unveil the entire search path now that we have loaded the personality data. */
|
|
- if (!unveil_search_paths(&pkg_client, personality))
|
|
- {
|
|
- fprintf(stderr, "pkgconf: unveil failed: %s\n", strerror(errno));
|
|
- return EXIT_FAILURE;
|
|
- }
|
|
-
|
|
#ifndef PKGCONF_LITE
|
|
if ((want_flags & PKG_MSVC_SYNTAX) == PKG_MSVC_SYNTAX || getenv("PKG_CONFIG_MSVC_SYNTAX") != NULL)
|
|
want_render_ops = msvc_renderer_get();
|
|
@@ -1452,6 +1445,13 @@ main(int argc, char *argv[])
|
|
/* at this point, want_client_flags should be set, so build the dir list */
|
|
pkgconf_client_dir_list_build(&pkg_client, personality);
|
|
|
|
+ /* unveil the entire search path now that we have loaded the personality data. */
|
|
+ if (!unveil_search_paths(&pkg_client, personality))
|
|
+ {
|
|
+ fprintf(stderr, "pkgconf: unveil failed: %s\n", strerror(errno));
|
|
+ return EXIT_FAILURE;
|
|
+ }
|
|
+
|
|
/* preload any files in PKG_CONFIG_PRELOADED_FILES */
|
|
pkgconf_client_preload_from_environ(&pkg_client, "PKG_CONFIG_PRELOADED_FILES");
|
|
|