Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Revert "Don't look for background updates unless Wrangler finished su…
Browse files Browse the repository at this point in the history
…ccessfully"

This reverts commit 45f5ab2 to avoid #2161.
It's unclear to me why that would have introduced a regression,
but this whole issue is actual Undefined Behavior according to the C
standard, so it's basically impossible to predict the behavior of the program
from the source code. I unfortunately wasn't able to reproduce the regression locally so I'm not
sure whether this helps or not.
  • Loading branch information
jyn514 authored and Electroid committed Dec 22, 2021
1 parent 8a7ae47 commit d504457
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ fn main() -> Result<()> {
}
env_logger::init();

let latest_version_receiver = background_check_for_updates();
if let Ok(me) = env::current_exe() {
// If we're actually running as the installer then execute our
// self-installation, otherwise just continue as usual.
Expand All @@ -35,7 +36,7 @@ fn main() -> Result<()> {
}
}
run()?;
if let Ok(latest_version) = background_check_for_updates().try_recv() {
if let Ok(latest_version) = latest_version_receiver.try_recv() {
let latest_version = styles::highlight(latest_version.to_string());
let new_version_available = format!(
"A new version of Wrangler ({}) is available!",
Expand Down

0 comments on commit d504457

Please sign in to comment.