From 423da0322aa468400fa393cf18bc4f7b14c3a324 Mon Sep 17 00:00:00 2001 From: Jason M Jones Date: Wed, 25 Jun 2014 12:38:56 -0400 Subject: [PATCH] fixing issue #96, the regex used to match files is hanging in Windows 7 x64, so changing to use path.dirname instead --- lib/utils/getModulePaths.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/getModulePaths.js b/lib/utils/getModulePaths.js index 219d30b..cfdda67 100644 --- a/lib/utils/getModulePaths.js +++ b/lib/utils/getModulePaths.js @@ -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 ); } });