Skip to content

Commit

Permalink
Merge pull request #14 from nevvermind/crazy-vendor
Browse files Browse the repository at this point in the history
Fixes wrong value returned when getting the vendor dir through PluginConfig
  • Loading branch information
Flyingmana committed May 3, 2015
2 parents 2b66b39 + c1d88a1 commit 6a4d087
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/MagentoHackathon/Composer/Magento/ProjectConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,11 @@ public function getComposerRepositories()
*/
public function getVendorDir()
{
return $this->fetchVarFromConfigArray($this->composerConfig, 'vendor-dir', 'vendor');
return $this->fetchVarFromConfigArray(
$this->composerConfig['config'],
'vendor-dir',
getcwd() . '/vendor'
);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function setUp()
new InstalledPackageDumper()
);

$config = new ProjectConfig(array(), array('vendor-dir' => 'vendor'));
$config = new ProjectConfig(array(), array('config' => array('vendor-dir' => 'vendor')));
$this->unInstallStrategy =
$this->getMock('MagentoHackathon\Composer\Magento\UnInstallStrategy\UnInstallStrategyInterface');

Expand Down

0 comments on commit 6a4d087

Please sign in to comment.