Skip to content

Commit 6f6c6a0

Browse files
committed
alter Installer
1 parent 082427e commit 6f6c6a0

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/Installer.php

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,33 @@
55
use Composer\Package\PackageInterface;
66
use Composer\Installer\LibraryInstaller;
77

8+
use Composer\Composer;
9+
use Composer\IO\IOInterface;
810
use Composer\Repository\InstalledRepositoryInterface;
11+
use Composer\Package\PackageInterface;
12+
use Composer\Util\Filesystem;
13+
use Composer\Util\Silencer;
914

1015
class Installer extends LibraryInstaller
1116
{
17+
18+
private $phpDir = '';
19+
20+
/**
21+
* {@inheritDoc}
22+
*/
23+
public function __construct(
24+
IOInterface $io,
25+
Composer $composer,
26+
$type = 'library',
27+
Filesystem $filesystem = null,
28+
BinaryInstaller $binaryInstaller = null
29+
){
30+
parent::__construct($io, $composer, $type = 'library', $filesystem = null, $binaryInstaller = null);
31+
$this->phpDir = dirname(rtrim($composer->getConfig()->get('vendor-dir'), '/'));
32+
}
33+
34+
1235
/**
1336
* {@inheritDoc}
1437
*/
@@ -54,7 +77,7 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa
5477

5578
//ME Code ----
5679
$packConfig = $downloadPath.'/Config';
57-
$appConfig = $this->baseDir.'/.php/Config';
80+
$appConfig = $this->phpDir.'/.php/Config';
5881

5982
echo "\n\n\tPackConfig: $packConfig\n\tAppConfig: $appConfig\n\n";
6083

0 commit comments

Comments
 (0)