From c8392f40edd45367b4cde01ac80c070ae5a8240b Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 3 Apr 2018 22:02:28 +1000 Subject: src/luaconf.js: Remove duplicate entries from LUA_PATH_DEFAULT Closes #123 --- NEWS | 1 + src/luaconf.js | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index c53c902..800c581 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ UNRELEASED - Fix node 6 compatibility + - Removed duplicate LUA_PATH entries 0.1.0 - 2018-03-31 diff --git a/src/luaconf.js b/src/luaconf.js index 7a6fe40..387e813 100644 --- a/src/luaconf.js +++ b/src/luaconf.js @@ -43,12 +43,12 @@ if (typeof process === "undefined") { const LUA_LDIR = "./lua/" + LUA_VDIR + "/"; module.exports.LUA_LDIR = LUA_LDIR; - const LUA_JSDIR = "./lua/" + LUA_VDIR + "/"; + const LUA_JSDIR = LUA_LDIR; module.exports.LUA_JSDIR = LUA_JSDIR; const LUA_PATH_DEFAULT = to_luastring( LUA_LDIR + "?.lua;" + LUA_LDIR + "?/init.lua;" + - LUA_JSDIR + "?.lua;" + LUA_JSDIR + "?/init.lua;" + + /* LUA_JSDIR excluded as it is equal to LUA_LDIR */ "./?.lua;./?/init.lua" ); module.exports.LUA_PATH_DEFAULT = LUA_PATH_DEFAULT; @@ -100,15 +100,14 @@ if (typeof process === "undefined") { const LUA_LDIR2 = LUA_ROOT2 + "share/lua/" + LUA_VDIR + "/"; module.exports.LUA_LDIR = LUA_LDIR; - const LUA_JSDIR = LUA_ROOT + "share/lua/" + LUA_VDIR + "/"; + const LUA_JSDIR = LUA_LDIR; module.exports.LUA_JSDIR = LUA_JSDIR; - const LUA_JSDIR2 = LUA_ROOT2 + "share/lua/" + LUA_VDIR + "/"; + const LUA_JSDIR2 = LUA_LDIR2; const LUA_PATH_DEFAULT = to_luastring( LUA_LDIR + "?.lua;" + LUA_LDIR + "?/init.lua;" + LUA_LDIR2 + "?.lua;" + LUA_LDIR2 + "?/init.lua;" + - LUA_JSDIR + "?.lua;" + LUA_JSDIR + "?/init.lua;" + - LUA_JSDIR2 + "?.lua;" + LUA_JSDIR2 + "?/init.lua;" + + /* LUA_JSDIR(2) excluded as it is equal to LUA_LDIR(2) */ "./?.lua;./?/init.lua" ); module.exports.LUA_PATH_DEFAULT = LUA_PATH_DEFAULT; -- cgit v1.2.3-70-g09d2