Skip to content

Commit 8c31491

Browse files
authored
Merge pull request #45 from dkd/composer_relative_path
2 parents de00ecc + f21079b commit 8c31491

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Plugin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
use Composer\Autoload\ClassLoader;
14+
use Composer\Config;
1415
use Composer\Composer;
1516
use Composer\EventDispatcher\EventSubscriberInterface;
1617
use Composer\IO\IOInterface;
@@ -99,7 +100,7 @@ public function onPreAutoloadDump()
99100
if ($includeFile->dump()) {
100101
$rootPackage = $this->composer->getPackage();
101102
$autoloadDefinition = $rootPackage->getAutoload();
102-
$autoloadDefinition['files'][] = $includeFilePath;
103+
$autoloadDefinition['files'][] = $this->composer->getConfig()->get('vendor-dir', Config::RELATIVE_PATHS) . self::INCLUDE_FILE;
103104
$rootPackage->setAutoload($autoloadDefinition);
104105
$this->io->writeError('<info>helhum/dotenv-connector:</info> Generated dotenv include file');
105106
} else {

0 commit comments

Comments
 (0)