From c8d84ffc77839d40aa441507cc393963f0564f00 Mon Sep 17 00:00:00 2001 From: hasezoey Date: Fri, 16 Sep 2022 17:45:42 +0200 Subject: [PATCH] Version::getShortVersion: handle "rev" being empty (#9502) In which case we reply "unknown" instead of an empty string ;). --- frontend/version.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/version.lua b/frontend/version.lua index 702949c2f..67917ef09 100644 --- a/frontend/version.lua +++ b/frontend/version.lua @@ -55,6 +55,7 @@ end function Version:getShortVersion() if not self.short then local rev = self:getCurrentRevision() + if (not rev or rev == "") then return "unknown" end local year, month, point, revision = rev:match("v(%d%d%d%d)%.(%d%d)%.?(%d?%d?)-?(%d*)") self.short = year .. "." .. month if point and point ~= "" then