From: Michael Wallner Date: Fri, 15 Apr 2016 09:06:47 +0000 (+0200) Subject: display userinfo on error X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=ae0733a44ac3e68871476841b7f01b8ad3d18629;p=m6w6%2Ftravis-pecl display userinfo on error --- diff --git a/check-packagexml.php b/check-packagexml.php index d53a44e..74b84ca 100755 --- a/check-packagexml.php +++ b/check-packagexml.php @@ -19,6 +19,13 @@ $pf = $factory->fromPackageFile($argv[1], PEAR_VALIDATE_NORMAL); if (PEAR::isError($pf)) { fprintf(STDERR, "ERROR: %s\n", $pf->getMessage()); + if (is_array($infos = $pf->getUserInfo())) { + foreach ($infos as $info) { + fprintf(STDERR, " %s\n", $info["message"]); + } + } elseif (strlen($infos)) { + fprintf(STDERR, " %s\n", $infos); + } exit(1); }