fix: engines.execScriptFile() missing executePath config

This commit is contained in:
hyb1996
2018-02-23 22:42:53 +08:00
parent 622bb4c277
commit 198a694064
6 changed files with 12 additions and 7 deletions

View File

@@ -26,11 +26,14 @@ module.exports = function(__runtime__, scope){
function fillConfig(c){
var config = new com.stardust.autojs.execution.ExecutionConfig();
c = c || {};
c.path = c.path || files.cwd();
if(c.path){
if(typeof(c.path) == "string"){
config.path([c.path]);
config.requirePath([c.path]);
config.executePath(c.path);
}else{
config.path(c.path);
config.requirePath(c.path);
config.executePath(c.path[0]);
}
}
c.delay = c.delay || 0;