prosodyctl about: Strip name from lua module _VERSION
Some modules have _VERSION = "LuaModule x.y.z", so it is a bit weird
to show the name twice.
--- a/prosodyctl Fri Jul 10 03:29:02 2020 +0200
+++ b/prosodyctl Fri Jul 10 03:29:06 2020 +0200
@@ -457,7 +457,11 @@
if #name > longest_name then
longest_name = #name;
end
- module_versions[name] = module._VERSION;
+ local mod_version = module._VERSION;
+ if tostring(mod_version):sub(1, #name+1) == name .. " " then
+ mod_version = mod_version:sub(#name+2);
+ end
+ module_versions[name] = mod_version;
end
end
if lunbound then