Skip to content

Commit

Permalink
Consider news read if news.version > current version (#3734)
Browse files Browse the repository at this point in the history
Avoids two installations of taskwarrior with differing versions from
constantly nagging and rewriting `news.version`
  • Loading branch information
Tejada-Omar authored Dec 23, 2024
1 parent 1b9353d commit 3bf0200
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/CmdNews.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 3bf0200

Please sign in to comment.