diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-17 19:39:22 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-03-17 19:39:22 -0300 |
commit | dc5f2009eaf765a21c6ea285b5ad3f45b17e5752 (patch) | |
tree | d2ef08cc5b76c1007b59e3dd3e1a24060c439456 /src | |
parent | 4347dc7ab33ea4c6657578d234fd986bbfb4e3bc (diff) | |
download | luarocks-dc5f2009eaf765a21c6ea285b5ad3f45b17e5752.tar.gz luarocks-dc5f2009eaf765a21c6ea285b5ad3f45b17e5752.tar.bz2 luarocks-dc5f2009eaf765a21c6ea285b5ad3f45b17e5752.zip |
Make it a bit more robust.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/upload/api.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/upload/api.lua b/src/luarocks/upload/api.lua index ec6ef3bb..6dfb98df 100644 --- a/src/luarocks/upload/api.lua +++ b/src/luarocks/upload/api.lua | |||
@@ -121,7 +121,7 @@ if not ltn12_ok then -- If not using LuaSocket and/or LuaSec... | |||
121 | 121 | ||
122 | local function redact_api_url(url) | 122 | local function redact_api_url(url) |
123 | url = tostring(url) | 123 | url = tostring(url) |
124 | return (url:gsub(".*/api/[^/]+/[^/]+", "")) | 124 | return (url:gsub(".*/api/[^/]+/[^/]+", "")) or "" |
125 | end | 125 | end |
126 | 126 | ||
127 | function Api:request(url, params, post_params) | 127 | function Api:request(url, params, post_params) |