From f67dc0218bcfb62be3e839a63a1dee042909a6c6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 12 Jan 2023 08:17:48 +0100 Subject: global-functions: $ScriptInstallUpdate: handle config version decrease... ... and log a warning. --- global-functions | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 9e89670..9ed6b4a 100644 --- a/global-functions +++ b/global-functions @@ -796,7 +796,13 @@ } } - :if ($ExpectedConfigVersionBefore != $ExpectedConfigVersion) do={ + :if ($ExpectedConfigVersionBefore > $ExpectedConfigVersion) do={ + $LogPrintExit2 warning $0 ("The configuration version decreased from " . \ + $ExpectedConfigVersionBefore . " to " . $ExpectedConfigVersion . \ + ". Installed an older version?") false; + } + + :if ($ExpectedConfigVersionBefore < $ExpectedConfigVersion) do={ :global GlobalConfigChanges; :global GlobalConfigMigration; :local ChangeLogCode; -- cgit v1.2.3-54-g00ecf