summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2023-01-23 23:16:03 +0000
committerArun Isaac2023-01-23 23:16:44 +0000
commitbaed1d3f1bde48aa7ecafed22c6ad4c538ebf5d8 (patch)
treebe0ce27cac76d3156de2d9eca295846ac20b2781
parentbb0c921a38a468300c70483d2d1370d63e7e070a (diff)
downloadtissue-baed1d3f1bde48aa7ecafed22c6ad4c538ebf5d8.tar.gz
tissue-baed1d3f1bde48aa7ecafed22c6ad4c538ebf5d8.tar.lz
tissue-baed1d3f1bde48aa7ecafed22c6ad4c538ebf5d8.zip
bin: Add repository top level directory to load path.
* bin/tissue (main, pull): Add top level directory of repository to load path.
-rwxr-xr-xbin/tissue13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/tissue b/bin/tissue
index aaaa122..948460d 100755
--- a/bin/tissue
+++ b/bin/tissue
@@ -406,6 +406,13 @@ HOSTNAME."
(call-with-temporary-directory
(lambda (temporary-repository-clone)
(clone (git-top-level) temporary-repository-clone)
+ ;; Add the top level of the git repository to the
+ ;; load path since there may be user-written
+ ;; modules in the repository.
+ ;; TODO: Though not strictly required, it would
+ ;; be better to remove the added load path once
+ ;; done.
+ (add-to-load-path temporary-repository-clone)
;; Index.
(unless (file-exists? "xapian")
(mkdir "xapian"))
@@ -482,6 +489,12 @@ Pull latest from upstream repositories.
(display (condition-message c) (current-error-port))
(newline (current-error-port))
(exit #f)))
+ ;; Add the top level of the git repository to the load path since
+ ;; there may be user-written modules in the repository.
+ (match args
+ ((_ (or "repl" "web-dev") _ ...)
+ (add-to-load-path (git-top-level)))
+ (_ #t))
(match args
((_ (or "-h" "--help"))
(print-usage))