diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-05-25 18:10:58 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-05-25 18:10:58 -0300 |
commit | b85baacde60bb57f66bff8e1e51f4d2635e101df (patch) | |
tree | 9c60a4a785919d759719133bd2a4bbebf0b56fd6 | |
parent | 4462ca51ee10363916c29c071942c15f424913e6 (diff) | |
download | luarocks-b85baacde60bb57f66bff8e1e51f4d2635e101df.tar.gz luarocks-b85baacde60bb57f66bff8e1e51f4d2635e101df.tar.bz2 luarocks-b85baacde60bb57f66bff8e1e51f4d2635e101df.zip |
Correct use of which_config. Fixes #374.
-rw-r--r-- | src/luarocks/upload/api.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/luarocks/upload/api.lua b/src/luarocks/upload/api.lua index ba4aaff4..2cf462fb 100644 --- a/src/luarocks/upload/api.lua +++ b/src/luarocks/upload/api.lua | |||
@@ -10,11 +10,11 @@ local multipart = require("luarocks.upload.multipart") | |||
10 | local Api = {} | 10 | local Api = {} |
11 | 11 | ||
12 | local function upload_config_file() | 12 | local function upload_config_file() |
13 | local _, _, home_conf, home_ok = cfg.which_config() | 13 | local conf = cfg.which_config() |
14 | if not home_conf then | 14 | if not conf.user.file then |
15 | return nil | 15 | return nil |
16 | end | 16 | end |
17 | return (home_conf:gsub("/[^/]+$", "/upload_config.lua")) | 17 | return (conf.user.file:gsub("/[^/]+$", "/upload_config.lua")) |
18 | end | 18 | end |
19 | 19 | ||
20 | function Api:load_config() | 20 | function Api:load_config() |
@@ -254,7 +254,7 @@ end | |||
254 | 254 | ||
255 | end | 255 | end |
256 | 256 | ||
257 | function api.new(flags, name) | 257 | function api.new(flags) |
258 | local self = {} | 258 | local self = {} |
259 | setmetatable(self, { __index = Api }) | 259 | setmetatable(self, { __index = Api }) |
260 | self.config = self:load_config() or {} | 260 | self.config = self:load_config() or {} |