File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -46,16 +46,18 @@ function loadPlugins (options) {
4646 return hooks ;
4747}
4848
49- module . exports . getInstance = function ( isModule , options , callback ) {
49+ module . exports . getInstance = function (
50+ isModule ,
51+ options = { cwd : process . cwd ( ) } ,
52+ callback
53+ ) {
5054 delete require . cache [ require . resolve ( './api.js' ) ] ;
5155 delete require . cache [ require . resolve ( 'optimist' ) ] ;
5256 var Mod = require ( './api.js' ) ;
5357 var plugins = { } ;
54-
55- var options_ = options || { } ;
56- options_ . cwd = options . cwd || process . cwd ;
58+
5759 try {
58- if ( ! options || ! options . noPlugins ) plugins = loadPlugins ( options_ ) ;
60+ if ( ! options || ! options . noPlugins ) plugins = loadPlugins ( options ) ;
5961 } catch ( ex ) {
6062 log . warn ( ex ) ;
6163 }
You can’t perform that action at this time.
0 commit comments