From 480ba32510dad5972a66b26a7c3cebbb13426e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Wed, 8 May 2024 03:21:05 +0200 Subject: [PATCH] Fix autoupdate package version nil (#3982) --- scripts/autoupdate.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/autoupdate.lua b/scripts/autoupdate.lua index 769c5f0d1..7934e6c6d 100644 --- a/scripts/autoupdate.lua +++ b/scripts/autoupdate.lua @@ -69,8 +69,8 @@ function _update_version(instance, version, shasum) os.vexec("git checkout %s", branch) local inserted = false local scriptfile = path.join(instance:scriptdir(), "xmake.lua") + local version_current if os.isfile(scriptfile) then - local version_current io.gsub(scriptfile, "add_versions%(\"(.-)\",%s+\"(.-)\"%)", function (v, h) if not version_current or semver.compare(v, version_current) > 0 then version_current = v