diff options
author | Ignacio Burgueño <iburgueno@gmail.com> | 2015-04-20 15:12:44 -0300 |
---|---|---|
committer | Ignacio Burgueño <iburgueno@gmail.com> | 2015-04-20 15:12:44 -0300 |
commit | 2a0a9fa986e30a13c28ef4564cc77fb8a42dafa7 (patch) | |
tree | c69b168073364d4843a42220baa0e6f1a3f0ea8d | |
parent | 9aa5d054ee6f5aeecda979a11841ce82f16a0443 (diff) | |
parent | 968e96378d32d5be53ce169a3b1bf386fee538fd (diff) | |
download | luarocks-2a0a9fa986e30a13c28ef4564cc77fb8a42dafa7.tar.gz luarocks-2a0a9fa986e30a13c28ef4564cc77fb8a42dafa7.tar.bz2 luarocks-2a0a9fa986e30a13c28ef4564cc77fb8a42dafa7.zip |
Merge pull request #359 from ignacio/redact_verbose
Redact api tokens when using --verbose flag
-rw-r--r-- | src/luarocks/fs.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/luarocks/fs.lua b/src/luarocks/fs.lua index 72e11c09..3ecdfacd 100644 --- a/src/luarocks/fs.lua +++ b/src/luarocks/fs.lua | |||
@@ -31,7 +31,8 @@ fs.verbose = function() -- patch io.popen and os.execute to display commands | |||
31 | 31 | ||
32 | old_exec = os.execute | 32 | old_exec = os.execute |
33 | os.execute = function(cmd) | 33 | os.execute = function(cmd) |
34 | print("\nos.execute: ", cmd) | 34 | -- redact api keys if present |
35 | print("\nos.execute: ", cmd:gsub("(/api/[^/]+/)([^/]+)/", function(cap, key) return cap.."<redacted>/" end)) | ||
35 | local code = pack(old_exec(cmd)) | 36 | local code = pack(old_exec(cmd)) |
36 | print("Results: "..tostring(code.n)) | 37 | print("Results: "..tostring(code.n)) |
37 | for i = 1,code.n do | 38 | for i = 1,code.n do |