fix: engines.exec*** reports error

This commit is contained in:
hyb1996
2018-03-15 16:48:24 +08:00
parent 0d94c36d8c
commit 714cbd5759

View File

@@ -28,12 +28,12 @@ module.exports = function(__runtime__, scope){
c = c || {}; c = c || {};
c.path = c.path || files.cwd(); c.path = c.path || files.cwd();
if(c.path){ if(c.path){
if(typeof(c.path) == "string"){ if(Array.isArray(c.path)){
config.requirePath([c.path]);
config.executePath(c.path);
}else{
config.requirePath(c.path); config.requirePath(c.path);
config.executePath(c.path[0]); config.executePath(c.path[0]);
}else{
config.requirePath([c.path]);
config.executePath(c.path);
} }
} }
c.delay = c.delay || 0; c.delay = c.delay || 0;