diff --git a/exec/install-xtrn.js b/exec/install-xtrn.js index 4e04f598b30ee448eddff7f80bb310365a4a9b07..5ff3ecd2cad6eb3fccd4319cb84b6ee662a15cb5 100644 --- a/exec/install-xtrn.js +++ b/exec/install-xtrn.js @@ -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; }