Skip to content

Commit bc598de

Browse files
committed
Merge pull request #26 from PedroTroller/fix/root-alias-package
Alias packages can now be used
2 parents 56cd5a9 + 2c93943 commit bc598de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/NodeJsPlugin.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace Mouf\NodeJsInstaller;
33

44
use Composer\Composer;
5+
use Composer\Package\AliasPackage;
56
use Composer\Package\CompletePackage;
67
use Composer\Script\Event;
78
use Composer\EventDispatcher\EventSubscriberInterface;
@@ -200,7 +201,9 @@ private function getMergedVersionConstraint()
200201
$versions = array();
201202

202203
foreach ($packagesList as $package) {
203-
/* @var $package PackageInterface */
204+
if ($package instanceof AliasPackage) {
205+
$package = $package->getAliasOf();
206+
}
204207
if ($package instanceof CompletePackage) {
205208
$extra = $package->getExtra();
206209
if (isset($extra['mouf']['nodejs']['version'])) {

0 commit comments

Comments
 (0)