Skip to content

Commit 0091e9c

Browse files
author
Anton
authored
Merge pull request #10 from bluzphp/develop
Hotfix vendor path
2 parents 3f6b850 + 16f5b14 commit 0091e9c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Installers/Plugin.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ class Plugin implements PluginInterface, EventSubscriberInterface
4343
*/
4444
protected $installer;
4545

46+
/**
47+
* @var string
48+
*/
49+
protected $vendorPath;
50+
4651
/**
4752
* @var string
4853
*/
@@ -72,6 +77,7 @@ public function __construct()
7277
public function activate(Composer $composer, IOInterface $io)
7378
{
7479
$this->installer = new Installer($io, $composer);
80+
$this->vendorPath = $composer->getConfig()->get('vendor-dir');
7581
$composer->getInstallationManager()->addInstaller($this->installer);
7682
}
7783

@@ -205,7 +211,7 @@ protected function copyExtras($files)
205211
{
206212
foreach ($files as $source => $target) {
207213
$this->copy(
208-
dirname($this->installer->getVendorPath(), 2) . DS . $source,
214+
$this->vendorPath . DS . $source,
209215
PATH_ROOT . DS . $target
210216
);
211217
}

0 commit comments

Comments
 (0)