diff --git a/src/MagentoHackathon/Composer/Magento/ProjectConfig.php b/src/MagentoHackathon/Composer/Magento/ProjectConfig.php index 381a4cc6..6c4853c4 100644 --- a/src/MagentoHackathon/Composer/Magento/ProjectConfig.php +++ b/src/MagentoHackathon/Composer/Magento/ProjectConfig.php @@ -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' + ); } /** diff --git a/tests/MagentoHackathon/Composer/Magento/ModuleManagerTest.php b/tests/MagentoHackathon/Composer/Magento/ModuleManagerTest.php index 14a8eafb..a46fcc94 100644 --- a/tests/MagentoHackathon/Composer/Magento/ModuleManagerTest.php +++ b/tests/MagentoHackathon/Composer/Magento/ModuleManagerTest.php @@ -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');