lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

在 2015/12/25 11:52, Jonathan Goble 写道:
On Thu, Dec 24, 2015 at 10:46 PM, 书呆彭, Peng Yi <> wrote:
apparently the CONFIG_FILE variable is not expanded properly while
generating site_config.lua
I am not very familiar with how luarocks works, could someone please check
that out?
Windows batch files don't use $var for variable expansion. The proper
syntax is %var% (here, %CONFIG_FILE%).

actually the variable is not expanded by the cmd shell, it is expanded by the
installer script itself. the installer script is a lua script using some shell
commentary trick to run as a batch file.

I think the the script at line 986 missed a `S' call which expands the variables.
below is the trivial fix.

======================= patch ===========================
@@ -983,7 +983,7 @@
 if vars.SYSCONFFORCE then  -- only write this value when explcitly given, otherwise rely on defaults
-    f:write(S"site_config.LUAROCKS_SYSCONFIG=[[$CONFIG_FILE]]\n")
+    f:write("site_config.LUAROCKS_SYSCONFIG=[[$CONFIG_FILE]]\n")
 f:write("return site_config\n")
====================== end patch =========================

the nerdy Peng / 书呆彭 / Sent from Thunderbird