aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/cmd.lua13
-rw-r--r--src/luarocks/core/cfg.lua2
2 files changed, 14 insertions, 1 deletions
diff --git a/src/luarocks/cmd.lua b/src/luarocks/cmd.lua
index 53e0c60a..4200959c 100644
--- a/src/luarocks/cmd.lua
+++ b/src/luarocks/cmd.lua
@@ -348,6 +348,19 @@ function cmd.run_command(description, commands, ...)
348 project_dir = flags["project-tree"]:gsub("[/\\][^/\\]+$", "") 348 project_dir = flags["project-tree"]:gsub("[/\\][^/\\]+$", "")
349 end 349 end
350 350
351 -- FIXME A quick hack for the experimental Windows build
352 if os.getenv("LUAROCKS_CROSS_COMPILING") then
353 cfg.each_platform = function()
354 local i = 0
355 local plats = { "unix", "linux" }
356 return function()
357 i = i + 1
358 return plats[i]
359 end
360 end
361 fs.init()
362 end
363
351 ----------------------------------------------------------------------------- 364 -----------------------------------------------------------------------------
352 local ok, err = cfg.init(lua_data, project_dir, util.warning) 365 local ok, err = cfg.init(lua_data, project_dir, util.warning)
353 if not ok then 366 if not ok then
diff --git a/src/luarocks/core/cfg.lua b/src/luarocks/core/cfg.lua
index e160d69b..af57e7ca 100644
--- a/src/luarocks/core/cfg.lua
+++ b/src/luarocks/core/cfg.lua
@@ -276,7 +276,7 @@ local function make_defaults(lua_version, target_cpu, platforms, home)
276 local localappdata = os.getenv("LOCALAPPDATA") 276 local localappdata = os.getenv("LOCALAPPDATA")
277 if not localappdata then 277 if not localappdata then
278 -- for Windows versions below Vista 278 -- for Windows versions below Vista
279 localappdata = os.getenv("USERPROFILE").."/Local Settings/Application Data" 279 localappdata = (os.getenv("USERPROFILE") or "c:/Users/All Users").."/Local Settings/Application Data"
280 end 280 end
281 defaults.local_cache = localappdata.."/LuaRocks/Cache" 281 defaults.local_cache = localappdata.."/LuaRocks/Cache"
282 defaults.web_browser = "start" 282 defaults.web_browser = "start"