aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-27 15:48:03 +0000
committerhisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c>2009-10-27 15:48:03 +0000
commitc0f91f5db94dc92326e22af5d2ae56c97a8c587e (patch)
tree29f30c3f77fce0716f86f89c46b59a3693a408b6 /src
parentf1f6d62e74ca4e3f91b4fd81a0f6b8fc6d82db10 (diff)
downloadluarocks-c0f91f5db94dc92326e22af5d2ae56c97a8c587e.tar.gz
luarocks-c0f91f5db94dc92326e22af5d2ae56c97a8c587e.tar.bz2
luarocks-c0f91f5db94dc92326e22af5d2ae56c97a8c587e.zip
fixes to improve behavior of 'add'
git-svn-id: http://luarocks.org/svn/luarocks/trunk@115 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
Diffstat (limited to 'src')
-rw-r--r--src/luarocks/add.lua3
-rw-r--r--src/luarocks/cache.lua2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/luarocks/add.lua b/src/luarocks/add.lua
index f9d20782..2211a27a 100644
--- a/src/luarocks/add.lua
+++ b/src/luarocks/add.lua
@@ -52,6 +52,9 @@ local function add_file_to_server(refresh, rockfile, server, upload_server)
52 else 52 else
53 local_cache, protocol, server_path, user, password = cache.split_server_url(download_url, cfg.upload_user, cfg.upload_password) 53 local_cache, protocol, server_path, user, password = cache.split_server_url(download_url, cfg.upload_user, cfg.upload_password)
54 end 54 end
55 if not local_cache then
56 return nil, protocol
57 end
55 if not login_url then 58 if not login_url then
56 login_url = protocol.."://"..server_path 59 login_url = protocol.."://"..server_path
57 end 60 end
diff --git a/src/luarocks/cache.lua b/src/luarocks/cache.lua
index abf0a0fe..31594a7d 100644
--- a/src/luarocks/cache.lua
+++ b/src/luarocks/cache.lua
@@ -47,7 +47,7 @@ function refresh_local_cache(server, user, password)
47 if password then login_info = login_info .. " --password="..password end 47 if password then login_info = login_info .. " --password="..password end
48 48
49 -- TODO abstract away explicit 'wget' call 49 -- TODO abstract away explicit 'wget' call
50 local ok = fs.execute("wget -q -m -nd "..protocol.."://"..server_path..login_info) 50 local ok = fs.execute("wget -q -m -np -nd "..protocol.."://"..server_path..login_info)
51 if not ok then 51 if not ok then
52 return nil, "Failed downloading cache." 52 return nil, "Failed downloading cache."
53 end 53 end