diff options
-rw-r--r-- | src/luarocks/add.lua | 3 | ||||
-rw-r--r-- | src/luarocks/cache.lua | 2 |
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 |