Skip to content

Commit

Permalink
Merge pull request #97 from cksource/t/96
Browse files Browse the repository at this point in the history
Fix: The master repository package should not be loaded to packages dir. Closes #96.
  • Loading branch information
pomek authored Jan 11, 2019
2 parents bcbed0b + b4f2adc commit 7814c33
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

'use strict';

const path = require( 'upath' );
const chalk = require( 'chalk' );
const createForkPool = require( './utils/createforkpool' );
const displayLog = require( './utils/displaylog' );
Expand All @@ -26,8 +27,10 @@ module.exports = function( args, options ) {
return;
}

const cwd = getCwd();
const mainPackageName = require( path.resolve( cwd, 'package.json' ) ).name;
const startTime = process.hrtime();
const mgitOptions = getOptions( options, getCwd() );
const mgitOptions = getOptions( options, cwd );
const repositoryResolver = require( mgitOptions.resolverPath );
const forkPool = createForkPool( CHILD_PROCESS_PATH );

Expand Down Expand Up @@ -65,6 +68,11 @@ module.exports = function( args, options ) {
return;
}

// Do not enqueue main package even if other package from dependencies require it.
if ( packageName === mainPackageName ) {
return;
}

processedPackages.add( packageName );

const data = {
Expand Down

0 comments on commit 7814c33

Please sign in to comment.