diff options
author | Peter Melnichenko <mpeterval@gmail.com> | 2017-03-14 20:36:41 +0300 |
---|---|---|
committer | Peter Melnichenko <mpeterval@gmail.com> | 2017-03-14 20:36:41 +0300 |
commit | f9776022a99fba80848350d2a0cafd9973813182 (patch) | |
tree | 70f4b04c3479a558648fba11d7f28dede4641464 /src | |
parent | d76deda1e40589b34833b3ef629fd0d71dc39941 (diff) | |
download | luarocks-f9776022a99fba80848350d2a0cafd9973813182.tar.gz luarocks-f9776022a99fba80848350d2a0cafd9973813182.tar.bz2 luarocks-f9776022a99fba80848350d2a0cafd9973813182.zip |
Get rid of an implicit number to string conversion
Clearly tostring was implied instead of tonumber.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fs/tools.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/fs/tools.lua b/src/luarocks/fs/tools.lua index ed51b545..60d1d9ff 100644 --- a/src/luarocks/fs/tools.lua +++ b/src/luarocks/fs/tools.lua | |||
@@ -104,7 +104,7 @@ function tools.use_downloader(url, filename, cache) | |||
104 | if cfg.downloader == "wget" then | 104 | if cfg.downloader == "wget" then |
105 | local wget_cmd = fs.Q(vars.WGET).." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet " | 105 | local wget_cmd = fs.Q(vars.WGET).." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet " |
106 | if cfg.connection_timeout and cfg.connection_timeout > 0 then | 106 | if cfg.connection_timeout and cfg.connection_timeout > 0 then |
107 | wget_cmd = wget_cmd .. "--timeout="..tonumber(cfg.connection_timeout).." --tries=1 " | 107 | wget_cmd = wget_cmd .. "--timeout="..tostring(cfg.connection_timeout).." --tries=1 " |
108 | end | 108 | end |
109 | if cache then | 109 | if cache then |
110 | -- --timestamping is incompatible with --output-document, | 110 | -- --timestamping is incompatible with --output-document, |
@@ -120,7 +120,7 @@ function tools.use_downloader(url, filename, cache) | |||
120 | elseif cfg.downloader == "curl" then | 120 | elseif cfg.downloader == "curl" then |
121 | local curl_cmd = fs.Q(vars.CURL).." "..vars.CURLNOCERTFLAG.." -f -L --user-agent \""..cfg.user_agent.." via curl\" " | 121 | local curl_cmd = fs.Q(vars.CURL).." "..vars.CURLNOCERTFLAG.." -f -L --user-agent \""..cfg.user_agent.." via curl\" " |
122 | if cfg.connection_timeout and cfg.connection_timeout > 0 then | 122 | if cfg.connection_timeout and cfg.connection_timeout > 0 then |
123 | curl_cmd = curl_cmd .. "--connect-timeout "..tonumber(cfg.connection_timeout).." " | 123 | curl_cmd = curl_cmd .. "--connect-timeout "..tostring(cfg.connection_timeout).." " |
124 | end | 124 | end |
125 | ok = fs.execute_string(fs.quiet_stderr(curl_cmd..fs.Q(url).." > "..fs.Q(filename))) | 125 | ok = fs.execute_string(fs.quiet_stderr(curl_cmd..fs.Q(url).." > "..fs.Q(filename))) |
126 | end | 126 | end |