@@ -585,35 +585,39 @@ protected static function packagesInstall($installerInfo) {
585585 }
586586
587587 // reorder packages so the starterkit is first if it's being installed as a package
588- $ packages = $ installerInfo ["packages " ];
589- $ packages = array_merge (array_filter ($ packages , "self::includeStarterKit " ), array_filter ($ packages , "self::excludeStarterKit " ));
590-
591- foreach ($ packages as $ package ) {
592-
593- // set-up package info
594- $ extra = $ package ["extra " ];
595- $ type = $ package ["type " ];
596- $ name = $ package ["name " ];
597- $ pathBase = $ package ["pathBase " ];
598- $ pathDist = $ package ["pathDist " ];
599-
600- // make sure that it has the name-spaced section of data to be parsed. if it exists parse it
601- if (!empty ($ extra )) {
602- self ::parseComposerExtraList ($ extra , $ name , $ pathDist );
603- }
588+ if (isset ($ installerInfo ["packages " ])) {
604589
605- // see if the package has a listener
606- self ::scanForListener ( $ pathBase );
590+ $ packages = $ installerInfo [ " packages " ];
591+ $ packages = array_merge ( array_filter ( $ packages , " self::includeStarterKit " ), array_filter ( $ packages , " self::excludeStarterKit " ) );
607592
608- // address other specific needs based on type
609- if ($ type == "patternlab-patternengine " ) {
610- self ::scanForPatternEngineRule ($ pathBase );
611- } else if ($ type == "patternlab-starterkit " ) {
612- Config::updateConfigOption ("starterKit " ,$ name );
613- Config::updateConfigOption ("starterKitPath " ,$ pathBase );
614- } else if (($ type == "patternlab-styleguidekit " ) && (strpos ($ name ,"-assets- " ) === false )) {
615- Config::updateConfigOption ("styleguideKit " ,$ name );
616- Config::updateConfigOption ("styleguideKitPath " ,$ pathBase );
593+ foreach ($ packages as $ package ) {
594+
595+ // set-up package info
596+ $ extra = $ package ["extra " ];
597+ $ type = $ package ["type " ];
598+ $ name = $ package ["name " ];
599+ $ pathBase = $ package ["pathBase " ];
600+ $ pathDist = $ package ["pathDist " ];
601+
602+ // make sure that it has the name-spaced section of data to be parsed. if it exists parse it
603+ if (!empty ($ extra )) {
604+ self ::parseComposerExtraList ($ extra , $ name , $ pathDist );
605+ }
606+
607+ // see if the package has a listener
608+ self ::scanForListener ($ pathBase );
609+
610+ // address other specific needs based on type
611+ if ($ type == "patternlab-patternengine " ) {
612+ self ::scanForPatternEngineRule ($ pathBase );
613+ } else if ($ type == "patternlab-starterkit " ) {
614+ Config::updateConfigOption ("starterKit " ,$ name );
615+ Config::updateConfigOption ("starterKitPath " ,$ pathBase );
616+ } else if (($ type == "patternlab-styleguidekit " ) && (strpos ($ name ,"-assets- " ) === false )) {
617+ Config::updateConfigOption ("styleguideKit " ,$ name );
618+ Config::updateConfigOption ("styleguideKitPath " ,$ pathBase );
619+ }
620+
617621 }
618622
619623 }
0 commit comments