diff options
-rw-r--r-- | src/luarocks/deps.lua | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/luarocks/deps.lua b/src/luarocks/deps.lua index eb01075c..acc571f8 100644 --- a/src/luarocks/deps.lua +++ b/src/luarocks/deps.lua | |||
@@ -247,12 +247,16 @@ end | |||
247 | function deps.show_dep(dep, internal) | 247 | function deps.show_dep(dep, internal) |
248 | assert(type(dep) == "table") | 248 | assert(type(dep) == "table") |
249 | assert(type(internal) == "boolean" or not internal) | 249 | assert(type(internal) == "boolean" or not internal) |
250 | 250 | ||
251 | local pretty = {} | 251 | if #dep.constraints > 0 then |
252 | for _, c in ipairs(dep.constraints) do | 252 | local pretty = {} |
253 | table.insert(pretty, c.op .. " " .. deps.show_version(c.version, internal)) | 253 | for _, c in ipairs(dep.constraints) do |
254 | table.insert(pretty, c.op .. " " .. deps.show_version(c.version, internal)) | ||
255 | end | ||
256 | return dep.name.." "..table.concat(pretty, ", ") | ||
257 | else | ||
258 | return dep.name | ||
254 | end | 259 | end |
255 | return dep.name.." "..table.concat(pretty, ", ") | ||
256 | end | 260 | end |
257 | 261 | ||
258 | --- A more lenient check for equivalence between versions. | 262 | --- A more lenient check for equivalence between versions. |