]> granicus.if.org Git - php/commitdiff
* don't abort install if errors are found in the package, display
authorStig Bakken <ssb@php.net>
Sun, 28 Jul 2002 08:52:29 +0000 (08:52 +0000)
committerStig Bakken <ssb@php.net>
Sun, 28 Jul 2002 08:52:29 +0000 (08:52 +0000)
  a warning instead

pear/PEAR/Installer.php

index 590c11f122e70937f9cfc9f37d9a996267e8e06f..09f343dea4f06644ba9de055266602ac53e3b0d7 100644 (file)
@@ -402,8 +402,13 @@ class PEAR_Installer extends PEAR_Common
         $this->validatePackageInfo($pkginfo, $errors, $warnings);
         // XXX We allow warnings, have we to do it?
         if (count($errors)) {
-            return $this->raiseError("The following errors where found:\n".
-                                     implode("\n", $errors));
+            if (empty($options['force'])) {
+                return $this->raiseError("The following errors where found (use force option to install anyway):\n".
+                                         implode("\n", $errors));
+            } else {
+                $this->log(0, "warning : the following errors were found:\n".
+                           implode("\n", $errors));
+            }
         }
 
         $pkgname = $pkginfo['package'];