1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-28 19:19:53 +00:00

Address #212 - don't include janet args in script args.

This commit is contained in:
Calvin Rose 2019-12-04 08:30:36 -06:00
parent db9e431bf7
commit f39cf702db

View File

@ -2216,7 +2216,9 @@
(+= i (dohandler (string/slice arg 1) i)) (+= i (dohandler (string/slice arg 1) i))
(do (do
(set *no-file* false) (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)))) (set i lenargs))))
(when (and (not *compile-only*) (or *should-repl* *no-file*)) (when (and (not *compile-only*) (or *should-repl* *no-file*))