Skip to content

Commit

Permalink
Merge pull request #26 from PedroTroller/fix/root-alias-package
Browse files Browse the repository at this point in the history
Alias packages can now be used
  • Loading branch information
moufmouf committed Jan 5, 2016
2 parents 56cd5a9 + 2c93943 commit bc598de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/NodeJsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Mouf\NodeJsInstaller;

use Composer\Composer;
use Composer\Package\AliasPackage;
use Composer\Package\CompletePackage;
use Composer\Script\Event;
use Composer\EventDispatcher\EventSubscriberInterface;
Expand Down Expand Up @@ -200,7 +201,9 @@ private function getMergedVersionConstraint()
$versions = array();

foreach ($packagesList as $package) {
/* @var $package PackageInterface */
if ($package instanceof AliasPackage) {
$package = $package->getAliasOf();
}
if ($package instanceof CompletePackage) {
$extra = $package->getExtra();
if (isset($extra['mouf']['nodejs']['version'])) {
Expand Down

0 comments on commit bc598de

Please sign in to comment.