From 09da7fc790c9cd05b1a79a7777dbcc0c60b27349 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 6 Sep 2016 14:51:41 +0200 Subject: [PATCH] add pre-installed modules to SCRIPT_PATH too --- require.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/require.c b/require.c index ba50d48..d4ac265 100644 --- a/require.c +++ b/require.c @@ -599,7 +599,11 @@ void registerModule(const char* module, const char* version, const char* locatio putenvprintf("MODULE=%s", module); putenvprintf("%s_VERSION=%s", module, version); - if (location) putenvprintf("%s_DIR=%s", module, m->content+lm+lv); + if (location) + { + putenvprintf("%s_DIR=%s", module, m->content+lm+lv); + insertDirIntoPath("SCRIPT_PATH", m->content+lm+lv); + } /* only do registration register stuff at init */ if (interruptAccept) return; @@ -1552,8 +1556,6 @@ loadlib: status = 0; - insertDirIntoPath("SCRIPT_PATH", filename); - if (requireDebug) printf("require: looking for template directory\n"); /* filename = "/[dirlen]//R/[releasediroffs]..." */