Skip to content

Commit

Permalink
fixing issue #96, the regex used to match files is hanging in Windows…
Browse files Browse the repository at this point in the history
… 7 x64, so changing to use path.dirname instead
  • Loading branch information
jasonjoneski committed Jun 25, 2014
1 parent 919b124 commit 423da03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/utils/getModulePaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ module.exports = function() {
, args = [].slice.call(arguments);

packageJson.bundledDependencies.forEach( function( name ) {
var modulePath = [ 'modules', name ].concat( args ).join( path.sep );
if ( fs.existsSync( modulePath ) || ( /(.*)+\/\*/.test( modulePath ) && fs.existsSync( RegExp.$1 + '/' ) ) ) {
paths.push( modulePath );
var modulePath = [ 'modules', name ].concat( args ).join( path.sep );
if ( fs.existsSync( modulePath ) || fs.existsSync( path.dirname( modulePath ) ) ) {
paths.push( modulePath );
}
});

Expand Down

0 comments on commit 423da03

Please sign in to comment.