Skip to content

Commit

Permalink
fix loadpath
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Oct 15, 2023
1 parent a8335c5 commit 2d096f5
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/gerbil/runtime/init.ss
Original file line number Diff line number Diff line change
Expand Up @@ -243,19 +243,21 @@ namespace: #f
;; initialize the load path
(let* ((home (gerbil-home))
(libdir (path-expand "lib" home))
(loadpath
(cond
((getenv "GERBIL_LOADPATH" #f)
=> (lambda (envvar)
(filter (lambda (x) (not (string-empty? x)))
(string-split envvar #\:))))
(else '())))
(userpath
(path-expand "lib" (gerbil-path)))
(loadpath
(if (getenv "GERBIL_BUILD_PREFIX" #f)
(cons loadpath libdir)
(cons* loadpath userpath libdir))))
[libdir]
[userpath libdir]))
(loadpath
(cond
((getenv "GERBIL_LOADPATH" #f)
=> (lambda (envvar)
(append
(filter (lambda (x) (not (string-empty? x)))
(string-split envvar #\:))
loadpath)))
(else loadpath))))
(current-module-library-path loadpath))

;; initialize the modue registry
Expand Down

0 comments on commit 2d096f5

Please sign in to comment.