aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-18 18:05:38 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-18 18:05:38 -0300
commit603b0ea346d050bef2ced801ec8818773aae0fa0 (patch)
treea35b932f931b3c3a1ff5d510c05122a1b5e37907
parentbe3c52ddccabda19b5619117ece6317cc19aa9d5 (diff)
parentd820069d67fbae82d9e50cc347704399d34a4464 (diff)
downloadluarocks-603b0ea346d050bef2ced801ec8818773aae0fa0.tar.gz
luarocks-603b0ea346d050bef2ced801ec8818773aae0fa0.tar.bz2
luarocks-603b0ea346d050bef2ced801ec8818773aae0fa0.zip
Merge branch 'master' of https://github.com/keplerproject/luarocks
-rw-r--r--src/luarocks/upload/api.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/luarocks/upload/api.lua b/src/luarocks/upload/api.lua
index 6dfb98df..3ab271ad 100644
--- a/src/luarocks/upload/api.lua
+++ b/src/luarocks/upload/api.lua
@@ -116,14 +116,14 @@ local function require_json()
116 return nil 116 return nil
117end 117end
118 118
119local ltn12_ok, ltn12 = pcall(require, "ltn12")
120if not ltn12_ok then -- If not using LuaSocket and/or LuaSec...
121
122local function redact_api_url(url) 119local function redact_api_url(url)
123 url = tostring(url) 120 url = tostring(url)
124 return (url:gsub(".*/api/[^/]+/[^/]+", "")) or "" 121 return (url:gsub(".*/api/[^/]+/[^/]+", "")) or ""
125end 122end
126 123
124local ltn12_ok, ltn12 = pcall(require, "ltn12")
125if not ltn12_ok then -- If not using LuaSocket and/or LuaSec...
126
127function Api:request(url, params, post_params) 127function Api:request(url, params, post_params)
128 local vars = cfg.variables 128 local vars = cfg.variables
129 local json_ok, json = require_json() 129 local json_ok, json = require_json()