Don't hard fail when we couldn't find an entry point for an extension
authorChad Horohoe <chadh@wikimedia.org>
Mon, 28 Nov 2016 22:53:40 +0000 (14:53 -0800)
committerReedy <reedy@wikimedia.org>
Fri, 2 Dec 2016 00:31:11 +0000 (00:31 +0000)
It doesn't make a ton of sense, it's just pointing out that we have
a weird extension for which we cannot detect a standard entry point
for. These (unfortunately) exist, but they're easily worked around
using --list-file

Removing the hard failure allows you to use the two options in
tandem... --extension-dir for the initial pass and then --list-file
for the weirdo outstanding ones

Change-Id: I3d9cf1d614dacaa91fb2092019ccf1d14d61ccab

maintenance/mergeMessageFileList.php

index a650aa0..bb47631 100644 (file)
@@ -36,11 +36,6 @@ $mmfl = false;
  * @ingroup Maintenance
  */
 class MergeMessageFileList extends Maintenance {
-       /**
-        * @var bool
-        */
-       protected $hasError;
-
        function __construct() {
                parent::__construct();
                $this->addOption(
@@ -106,7 +101,6 @@ class MergeMessageFileList extends Maintenance {
                                }
 
                                if ( !$found ) {
-                                       $this->hasError = true;
                                        $this->error( "Extension {$extname} in {$extdir} lacks expected entry point: " .
                                                "extension.json, skin.json, or {$extname}.php." );
                                }
@@ -119,10 +113,6 @@ class MergeMessageFileList extends Maintenance {
                        $mmfl['setupFiles'] = array_merge( $mmfl['setupFiles'], $extensionPaths );
                }
 
-               if ( $this->hasError ) {
-                       $this->error( "Some files are missing (see above). Giving up.", 1 );
-               }
-
                if ( $this->hasOption( 'output' ) ) {
                        $mmfl['output'] = $this->getOption( 'output' );
                }