Only run one script, other args are arguments after all.
This commit is contained in:
parent
460d1c39b9
commit
26480a5e1c
@ -616,13 +616,7 @@ _finishArgs:
|
|||||||
(void)blockWidth;
|
(void)blockWidth;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Expect the rest of the arguments to be scripts to run;
|
result = krk_runfile(argv[optind],1,"__main__",argv[optind]);
|
||||||
* collect the result of the last one and use it as the
|
|
||||||
* exit code if it's an integer. */
|
|
||||||
for (int i = optind; i < argc; ++i) {
|
|
||||||
KrkValue out = krk_runfile(argv[i],1,"__main__",argv[i]);
|
|
||||||
if (i + 1 == argc) result = out;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
krk_freeVM();
|
krk_freeVM();
|
||||||
|
Loading…
Reference in New Issue
Block a user