1
0
mirror of https://github.com/janet-lang/janet synced 2026-04-18 12:51:27 +00:00

More work on fixing bunlde tools install.

This commit is contained in:
Calvin Rose
2024-05-25 13:23:11 -05:00
parent 2260a593bd
commit 8334504f4e
3 changed files with 7 additions and 3 deletions

View File

@@ -4067,6 +4067,7 @@
(def manifest (bundle/manifest bundle-name))
(def dir (os/cwd))
(def workdir (get manifest :local-source "."))
(def fixed-syspath (os/realpath (dyn *syspath*)))
(try
(os/cd workdir)
([_] (print "cannot enter source directory " workdir " for bundle " bundle-name)))
@@ -4077,8 +4078,9 @@
(put new-env *module-make-env* (fn make-bundle-env [&] (make-env new-env)))
(put new-env :workdir workdir)
(put new-env :bundle-name bundle-name)
(put new-env :bundle-dir (bundle-dir bundle-name))
(put new-env *syspath* fixed-syspath)
(with-env new-env
(put new-env :bundle-dir (bundle-dir bundle-name)) # get the syspath right
(require (string "@syspath/bundle/" bundle-name)))))
(defn- do-hook