From f39cf702dbf7927ef2f8bf9b483f2b8658798472 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Wed, 4 Dec 2019 08:30:36 -0600 Subject: [PATCH] Address #212 - don't include janet args in script args. --- src/boot/boot.janet | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 3b247628..34c9b739 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2216,7 +2216,9 @@ (+= i (dohandler (string/slice arg 1) i)) (do (set *no-file* false) - (dofile arg :prefix "" :exit *exit-on-error* :evaluator evaluator) + (def env (make-env)) + (put env :args (array/slice args i)) + (dofile arg :prefix "" :exit *exit-on-error* :evaluator evaluator :env env) (set i lenargs)))) (when (and (not *compile-only*) (or *should-repl* *no-file*))