mirror of
https://github.com/janet-lang/janet
synced 2024-12-29 18:00:26 +00:00
Restore :source property to keep import* working at REPL
This commit is contained in:
parent
c4a95e9a1e
commit
7f74ff3dd7
@ -3378,8 +3378,10 @@
|
|||||||
(file/read stdin :line buf))
|
(file/read stdin :line buf))
|
||||||
(def env (make-env))
|
(def env (make-env))
|
||||||
(when-let [profile.janet (dyn :profilepath)]
|
(when-let [profile.janet (dyn :profilepath)]
|
||||||
(def new-env (dofile profile.janet :exit true :env env))
|
(def src (env :source))
|
||||||
(merge-module env new-env "" false))
|
(def new-env (dofile profile.janet :exit true :source "profile.janet"))
|
||||||
|
(merge-module env new-env "" false)
|
||||||
|
(put env :source src))
|
||||||
(if *debug* (put env :debug true))
|
(if *debug* (put env :debug true))
|
||||||
(def getter (if *raw-stdin* getstdin getline))
|
(def getter (if *raw-stdin* getstdin getline))
|
||||||
(defn getchunk [buf p]
|
(defn getchunk [buf p]
|
||||||
|
Loading…
Reference in New Issue
Block a user