Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
Fix Composer not being run correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Anahkiasen committed Jun 24, 2013
1 parent 313f172 commit 168f469
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/Rocketeer/Tasks/Deploy.php
Expand Up @@ -26,7 +26,6 @@ public function execute()
$this->updateSymlink();

// Run composer
$this->gotoFolder($this->releasesManager->getCurrentReleasePath());
$this->runComposer();

// Set permissions
Expand Down
14 changes: 10 additions & 4 deletions src/Rocketeer/Tasks/Task.php
Expand Up @@ -93,14 +93,17 @@ abstract public function execute();
/**
* Run actions on the remote server and gather the ouput
*
* @param string $task
* @param string $tasks One or more tasks
*
* @return string
*/
public function run($task)
public function run($tasks)
{
$output = null;
$this->remote->run(array($task), function($results) use (&$output) {
$tasks = (array) $tasks;

$this->remote->run($tasks, function($results) use (&$output) {
print $output;
$output = $results;
});

Expand Down Expand Up @@ -189,7 +192,10 @@ public function setPermissions($folder)
*/
public function runComposer()
{
return $this->run('composer install');
return $this->run(array(
'cd '.$this->releasesManager->getCurrentReleasePath(),
'composer install'
));
}

////////////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions tests/TasksTest.php
Expand Up @@ -63,6 +63,7 @@ public function testCanDeployToServer()
$releasePath = $this->server.'/releases/'.$release;
$this->assertFileExists($releasePath);
$this->assertFileExists($releasePath.'/.git');
$this->assertFileExists($releasePath.'/vendor');

$this->app['files']->delete($this->server.'/current');
$this->app['files']->deleteDirectory($this->server);
Expand Down

0 comments on commit 168f469

Please sign in to comment.