Consider news read if news.version > current version (#3734)
Avoids two installations of taskwarrior with differing versions from constantly nagging and rewriting `news.version`
This commit is contained in:
@@ -593,7 +593,7 @@ int CmdNews::execute(std::string& output) {
|
|||||||
std::cout << outro.str();
|
std::cout << outro.str();
|
||||||
|
|
||||||
// Set a mark in the config to remember which version's release notes were displayed
|
// 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);
|
CmdConfig::setConfigVariable("news.version", std::string(current_version), false);
|
||||||
|
|
||||||
// Revert back to default signal handling after displaying the outro
|
// Revert back to default signal handling after displaying the outro
|
||||||
@@ -641,7 +641,7 @@ bool CmdNews::should_nag() {
|
|||||||
|
|
||||||
Version current_version = Version::Current();
|
Version current_version = Version::Current();
|
||||||
|
|
||||||
if (news_version == current_version) {
|
if (news_version >= current_version) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user