Skip to content

Commit

Permalink
Merge pull request #45 from dkd/composer_relative_path
Browse files Browse the repository at this point in the history
  • Loading branch information
helhum authored Jan 12, 2025
2 parents de00ecc + f21079b commit 8c31491
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

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

0 comments on commit 8c31491

Please sign in to comment.