Skip to content
Snippets Groups Projects
Commit 4a4dfc1d authored by Guy Zana's avatar Guy Zana
Browse files

run.js: ditch 'run' from arguments in invoke() instead run()

run_cmd.run() is an internal function that can be used by the rest of the cli.
parent f3ce61ba
No related branches found
No related tags found
No related merge requests found
......@@ -8,12 +8,10 @@ var run_cmd = {
},
run: function(argv) {
if (argv.length < 2) {
if (argv.length < 1) {
return -1;
}
argv.splice(0, 1);
var f = null;
if (argv[0].indexOf("/") == 0) {
f = File(argv[0]);
......@@ -37,6 +35,13 @@ var run_cmd = {
},
invoke: function(inp) {
if (inp.length < 2) {
return;
}
// ditch 'run'
inp.splice(0, 1);
rc = this.run(inp);
if (rc < 0) {
print("run: couldn't execute elf");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment