diff options
-rw-r--r-- | src/luarocks/cmd/show.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/luarocks/cmd/show.lua b/src/luarocks/cmd/show.lua index 6d8047d5..c5188538 100644 --- a/src/luarocks/cmd/show.lua +++ b/src/luarocks/cmd/show.lua | |||
@@ -149,6 +149,9 @@ local function render(template, data) | |||
149 | local n = cmd == "*" and #d or 1 | 149 | local n = cmd == "*" and #d or 1 |
150 | for i = 1, n do | 150 | for i = 1, n do |
151 | local tbl = cmd == "*" and d[i] or data | 151 | local tbl = cmd == "*" and d[i] or data |
152 | if type(tbl) == "string" then | ||
153 | tbl = tbl:gsub("%%", "%%%%") | ||
154 | end | ||
152 | table.insert(out, (line:gsub("${([a-z]+)}", tbl))) | 155 | table.insert(out, (line:gsub("${([a-z]+)}", tbl))) |
153 | end | 156 | end |
154 | end | 157 | end |