Do not check for self upgrade if already upgraded

This commit is contained in:
Roey Darwish Dror
2018-12-23 13:23:42 +02:00
parent ee54107d2a
commit 8e3727c73f
2 changed files with 2 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ fn run() -> Result<(), Error> {
#[cfg(feature = "self-update")]
{
if !opt.dry_run {
if !opt.dry_run && !env::var("TOPGRADE_NO_SELF_UPGRADE").is_ok() {
if let Err(e) = self_update::self_update() {
print_warning(format!("Self update error: {}", e));
if let Some(cause) = e.cause() {