From 26480a5e1ca9b1e80ce74ad3b724b1faab70d0bf Mon Sep 17 00:00:00 2001 From: "K. Lange" Date: Fri, 22 Jan 2021 11:10:52 +0900 Subject: [PATCH] Only run one script, other args are arguments after all. --- src/kuroko.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/kuroko.c b/src/kuroko.c index ccf4f7a..700f980 100644 --- a/src/kuroko.c +++ b/src/kuroko.c @@ -616,13 +616,7 @@ _finishArgs: (void)blockWidth; } } else { - /* Expect the rest of the arguments to be scripts to run; - * 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; - } + result = krk_runfile(argv[optind],1,"__main__",argv[optind]); } krk_freeVM();