Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console / src / Command / Module / InstallCommand.php
index 969cad2454cda3c8a373f8eb131a0ab8b3b0c582..1d3f6da19c45a9464e1b9c4b27b743a9533f946a 100644 (file)
@@ -13,7 +13,6 @@ use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
 use Symfony\Component\Process\ProcessBuilder;
-use Symfony\Component\Process\Exception\ProcessFailedException;
 use Symfony\Component\Console\Command\Command;
 use Drupal\Console\Command\Shared\ProjectDownloadTrait;
 use Drupal\Console\Command\Shared\ModuleTrait;
@@ -42,23 +41,23 @@ class InstallCommand extends Command
     protected $site;
 
     /**
- * @var Validator
-*/
    * @var Validator
+     */
     protected $validator;
 
     /**
- * @var ModuleInstaller
-*/
    * @var ModuleInstaller
+     */
     protected $moduleInstaller;
 
     /**
- * @var DrupalApi
-*/
    * @var DrupalApi
+     */
     protected $drupalApi;
 
     /**
- * @var Manager
-*/
    * @var Manager
+     */
     protected $extensionManager;
 
     /**
@@ -116,13 +115,13 @@ class InstallCommand extends Command
             )
             ->addOption(
                 'latest',
-                '',
+                null,
                 InputOption::VALUE_NONE,
                 $this->trans('commands.module.install.options.latest')
             )
             ->addOption(
                 'composer',
-                '',
+                null,
                 InputOption::VALUE_NONE,
                 $this->trans('commands.module.uninstall.options.composer')
             );
@@ -187,8 +186,6 @@ class InstallCommand extends Command
                         )
                     );
                     throw new \RuntimeException($process->getErrorOutput());
-
-                    return 0;
                 }
             }
 
@@ -241,6 +238,7 @@ class InstallCommand extends Command
             return 1;
         }
 
+        $this->site->removeCachedServicesFile();
         $this->chainQueue->addCommand('cache:rebuild', ['cache' => 'all']);
     }
 }