Skip to content
Snippets Groups Projects
Commit c20ee227 authored by rswindell's avatar rswindell
Browse files

Use the JS-standard method of passing a variable number of arguments to a

function (using function.apply()) rather than depending on the js.exec()
array-args-expansion feature I recently added and then just removed.
parent ac1a0004
Branches
Tags
No related merge requests found
......@@ -217,9 +217,10 @@ function main(ini_fname)
if (item.startup_dir === undefined)
item.startup_dir = startup_dir;
if (typeof item.args == 'string' && item.args.indexOf(' ') > 0)
item.args = item.args.split(' ');
var result = js.exec(item.file, item.startup_dir, {}, item.args);
if (!item.args)
items.args = "";
var result = js.exec.apply(null
,[item.file, item.startup_dir, {}].concat(item.args.split(/\s+/)));
if (result !== 0 && item.required)
return "Error " + result + " executing " + item.file;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment