aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2013-10-25 19:29:34 -0200
committerHisham Muhammad <hisham@gobolinux.org>2013-10-25 19:29:34 -0200
commitabac98ae19ec838e4a301a65c76bdc236047d641 (patch)
tree2ecc985af2c7d0b44aeadac2ce341d21541c7171
parent23a7eae336076d4bb3d443f5fc306c305bc8e077 (diff)
downloadluarocks-abac98ae19ec838e4a301a65c76bdc236047d641.tar.gz
luarocks-abac98ae19ec838e4a301a65c76bdc236047d641.tar.bz2
luarocks-abac98ae19ec838e4a301a65c76bdc236047d641.zip
Use a more idiomatic Windows path for the local caches
-rw-r--r--src/luarocks/cfg.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 019d9293..2da72db0 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -316,7 +316,13 @@ if detected.windows then
316 defaults.export_lua_path = "SET LUA_PATH=%s" 316 defaults.export_lua_path = "SET LUA_PATH=%s"
317 defaults.export_lua_cpath = "SET LUA_CPATH=%s" 317 defaults.export_lua_cpath = "SET LUA_CPATH=%s"
318 defaults.wrapper_suffix = ".bat" 318 defaults.wrapper_suffix = ".bat"
319 defaults.local_cache = home.."/cache/luarocks" 319
320 local localappdata = os.getenv("LOCALAPPDATA")
321 if not localappdata then
322 -- for Windows versions below Vista
323 localappdata = os.getenv("USER_PROFILE").."/Local Settings/Application Data"
324 end
325 defaults.local_cache = localappdata.."/LuaRocks/Cache"
320end 326end
321 327
322if detected.mingw32 then 328if detected.mingw32 then