Closed facekapow closed 9 years ago
Besides an argv-like array, it could be an object so command line args parsing is not needed :-)
You have a point. I''m just reporting an issue that I saw. But object params would make it easier for applications to get their parameters.
I have just got the idea when I saw your issue, that's all :-P
Yep, this looks like a bug.
I didn't see it in my PR. Noticed it after it merged.
When you pass an object as the second parameter to
runCommand
, the args option in it is not used. I believe the problem is in/js/service/shell/index.js
, line 39 (https://github.com/runtimejs/runtime/blob/master/js/service/shell/index.js#L39), where it rests the args parameter. Maybe instead ofopts.args = [];
, it could beopts.args = opts.args || [];
. I'm pretty sure that's the problem, because I changed it (in my clone of the repo) and it worked as it should.