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) {
46
46
return hooks ;
47
47
}
48
48
49
- module . exports . getInstance = function ( isModule , options , callback ) {
49
+ module . exports . getInstance = function (
50
+ isModule ,
51
+ options = { cwd : process . cwd ( ) } ,
52
+ callback
53
+ ) {
50
54
delete require . cache [ require . resolve ( './api.js' ) ] ;
51
55
delete require . cache [ require . resolve ( 'optimist' ) ] ;
52
56
var Mod = require ( './api.js' ) ;
53
57
var plugins = { } ;
54
-
55
- var options_ = options || { } ;
56
- options_ . cwd = options . cwd || process . cwd ;
58
+
57
59
try {
58
- if ( ! options || ! options . noPlugins ) plugins = loadPlugins ( options_ ) ;
60
+ if ( ! options || ! options . noPlugins ) plugins = loadPlugins ( options ) ;
59
61
} catch ( ex ) {
60
62
log . warn ( ex ) ;
61
63
}
You can’t perform that action at this time.
0 commit comments