diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-10-25 19:29:34 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-10-25 19:29:34 -0200 |
commit | abac98ae19ec838e4a301a65c76bdc236047d641 (patch) | |
tree | 2ecc985af2c7d0b44aeadac2ce341d21541c7171 | |
parent | 23a7eae336076d4bb3d443f5fc306c305bc8e077 (diff) | |
download | luarocks-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.lua | 8 |
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" | ||
320 | end | 326 | end |
321 | 327 | ||
322 | if detected.mingw32 then | 328 | if detected.mingw32 then |