From 965d431af6e9731c4cc526ac8f511a2dddff82e3 Mon Sep 17 00:00:00 2001 From: Omar Tejada <72728094+Tejada-Omar@users.noreply.github.com> Date: Mon, 23 Dec 2024 08:25:09 -0700 Subject: [PATCH] Consider news read if `news.version` > current version Avoids two installations of taskwarrior with differing versions from constantly nagging and rewriting `news.version` --- src/commands/CmdNews.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/CmdNews.cpp b/src/commands/CmdNews.cpp index 9f1c60df0..27202ff64 100644 --- a/src/commands/CmdNews.cpp +++ b/src/commands/CmdNews.cpp @@ -593,7 +593,7 @@ int CmdNews::execute(std::string& output) { std::cout << outro.str(); // Set a mark in the config to remember which version's release notes were displayed - if (news_version != current_version) { + if (news_version < current_version) { CmdConfig::setConfigVariable("news.version", std::string(current_version), false); // Revert back to default signal handling after displaying the outro @@ -641,7 +641,7 @@ bool CmdNews::should_nag() { Version current_version = Version::Current(); - if (news_version == current_version) { + if (news_version >= current_version) { return false; }