Navigation Menu

Skip to content

Commit

Permalink
Fixing an error when calling composer and adding doc block
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 17, 2014
1 parent 8d90a45 commit 583e918
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Console/Command/Task/PluginTask.php
Expand Up @@ -213,6 +213,14 @@ protected function _generateTestBootstrap($plugin, $path) {
$this->createFile($file, $out);
}

/**
* Modifies App's coposer.json to include the plugin and tries to call
* composer dump-autoload to refresh the autoloader cache
*
* @param string $plugin Name of plugin
* @param string $path The path to save the phpunit.xml file to.
* @return boolean True if composer could be modified correctly
*/
protected function _modifyAutoloader($plugin, $path) {
$path = dirname($path);

Expand All @@ -239,7 +247,8 @@ protected function _modifyAutoloader($plugin, $path) {
}

try {
$command = 'php ' . escapeshellarg($composer) . ' dump-autoload ';
$command = 'cd ' . escapeshellarg($path) . '; ';
$command .= 'php ' . escapeshellarg($composer) . ' dump-autoload ';
$this->Project->callComposer($command);
} catch (\RuntimeException $e) {
$error = $e->getMessage();
Expand Down

0 comments on commit 583e918

Please sign in to comment.