Catch errors when parsing package.xml files.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 31 Aug 2010 14:14:49 +0000 (10:14 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Tue, 31 Aug 2010 14:14:49 +0000 (10:14 -0400)
Currently, the Editor package fails to install, at least catch the error and continue.

framework/bin/install_framework

index 2f689c1..7aab9d7 100755 (executable)
@@ -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']);