Add no-self-update config and flag (#388)

This commit is contained in:
PolpOnline
2023-03-22 22:05:21 +01:00
committed by GitHub
parent 907465f891
commit 565aa405be
3 changed files with 16 additions and 1 deletions

View File

@@ -116,7 +116,9 @@ For more information about this issue see https://askubuntu.com/questions/110969
#[cfg(feature = "self-update")]
{
if !run_type.dry() && env::var("TOPGRADE_NO_SELF_UPGRADE").is_err() {
let config_self_upgrade = env::var("TOPGRADE_NO_SELF_UPGRADE").is_err() && !config.no_self_update();
if !run_type.dry() && config_self_upgrade {
let result = self_update::self_update();
if let Err(e) = &result {