From cbf8efaaa40f4d12ea996de54aebd903e6c8decc Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 31 Aug 2010 10:14:49 -0400 Subject: [PATCH] Catch errors when parsing package.xml files. Currently, the Editor package fails to install, at least catch the error and continue. --- framework/bin/install_framework | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/bin/install_framework b/framework/bin/install_framework index 2f689c189..7aab9d79f 100755 --- a/framework/bin/install_framework +++ b/framework/bin/install_framework @@ -192,7 +192,10 @@ foreach ($pkgs as $key => $val) { $cli->message('Installing package ' . $key); $pkg_ob = $pear_pkg->fromPackageFile($val . '/package.xml', PEAR_VALIDATE_NORMAL); - + if ($pkg_ob instanceof PEAR_Error) { + $cli->message('Could not install package ' . $key . ': ' . $pkg_ob->getMessage(), 'cli.error'); + continue; + } foreach ($pkg_ob->getInstallationFilelist() as $file) { $orig = realpath($val . '/' . $file['attribs']['name']); -- 2.11.0