diff options
author | Ignacio Burgueño <ignaciob@inconcertcc.com> | 2015-04-20 15:15:18 -0300 |
---|---|---|
committer | Ignacio Burgueño <ignaciob@inconcertcc.com> | 2015-04-20 15:15:18 -0300 |
commit | 97b98bf9a97e0cfcd5f2230737f4789a6dea88ec (patch) | |
tree | aa1af913ab58eaac6d95cfa71ded60b12213b0e0 | |
parent | 2a0a9fa986e30a13c28ef4564cc77fb8a42dafa7 (diff) | |
download | luarocks-97b98bf9a97e0cfcd5f2230737f4789a6dea88ec.tar.gz luarocks-97b98bf9a97e0cfcd5f2230737f4789a6dea88ec.tar.bz2 luarocks-97b98bf9a97e0cfcd5f2230737f4789a6dea88ec.zip |
Clip string.gsub results to just one when redacting url.
We're not interested in printing the number of replacements performed.
-rw-r--r-- | src/luarocks/fs.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luarocks/fs.lua b/src/luarocks/fs.lua index 3ecdfacd..57302c7f 100644 --- a/src/luarocks/fs.lua +++ b/src/luarocks/fs.lua | |||
@@ -32,7 +32,7 @@ fs.verbose = function() -- patch io.popen and os.execute to display commands | |||
32 | old_exec = os.execute | 32 | old_exec = os.execute |
33 | os.execute = function(cmd) | 33 | os.execute = function(cmd) |
34 | -- redact api keys if present | 34 | -- redact api keys if present |
35 | print("\nos.execute: ", cmd:gsub("(/api/[^/]+/)([^/]+)/", function(cap, key) return cap.."<redacted>/" end)) | 35 | print("\nos.execute: ", (cmd:gsub("(/api/[^/]+/)([^/]+)/", function(cap, key) return cap.."<redacted>/" end)) ) |
36 | local code = pack(old_exec(cmd)) | 36 | local code = pack(old_exec(cmd)) |
37 | print("Results: "..tostring(code.n)) | 37 | print("Results: "..tostring(code.n)) |
38 | for i = 1,code.n do | 38 | for i = 1,code.n do |