main: install a warning handler if --validate is requested

pull/116/head
William Pitcock 2017-02-04 19:06:58 -06:00
parent 820ad83edd
commit c1d7f1a620
1 changed files with 3 additions and 0 deletions

3
main.c
View File

@ -763,6 +763,9 @@ main(int argc, char *argv[])
if (getenv("PKG_CONFIG_DONT_RELOCATE_PATHS"))
want_flags |= (PKG_DONT_RELOCATE_PATHS);
if ((want_flags & PKG_VALIDATE) == PKG_VALIDATE)
pkgconf_client_set_warn_handler(&pkg_client, error_handler, NULL);
if ((want_flags & PKG_ABOUT) == PKG_ABOUT)
{
about();