diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-09-07 01:09:02 +0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-09-07 02:42:15 +0300 |
commit | 8e48c42e9565f23d2eebbd77027da32e0a86da18 (patch) | |
tree | f05c11a3205471abcfedc46b72f87ea3482af93d /src | |
parent | 8840171407a17a6237e193fde3d6a3cc8aee1c4e (diff) | |
download | luarocks-8e48c42e9565f23d2eebbd77027da32e0a86da18.tar.gz luarocks-8e48c42e9565f23d2eebbd77027da32e0a86da18.tar.bz2 luarocks-8e48c42e9565f23d2eebbd77027da32e0a86da18.zip |
init: store cmd_interpreter and luajit_version in generated config
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cmd/init.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/luarocks/cmd/init.lua b/src/luarocks/cmd/init.lua index 0138c056..8f76d06c 100644 --- a/src/luarocks/cmd/init.lua +++ b/src/luarocks/cmd/init.lua | |||
@@ -86,6 +86,12 @@ function init.command(flags, name, version) | |||
86 | if not fs.exists(config_file) then | 86 | if not fs.exists(config_file) then |
87 | local fd = io.open(config_file, "w") | 87 | local fd = io.open(config_file, "w") |
88 | fd:write("-- LuaRocks configuration for use with Lua " .. cfg.lua_version .. "\n") | 88 | fd:write("-- LuaRocks configuration for use with Lua " .. cfg.lua_version .. "\n") |
89 | if cfg.lua_interpreter then | ||
90 | fd:write(("lua_interpreter = %q\n"):format(cfg.lua_interpreter)) | ||
91 | end | ||
92 | if cfg.luajit_version then | ||
93 | fd:write(("luajit_version = %q\n"):format(cfg.luajit_version)) | ||
94 | end | ||
89 | fd:write("variables = {\n") | 95 | fd:write("variables = {\n") |
90 | local varnames = { | 96 | local varnames = { |
91 | "LUA_DIR", | 97 | "LUA_DIR", |