-
Notifications
You must be signed in to change notification settings - Fork 335
feat: message if wrangler needs updating #1190
Conversation
fcc8937
to
fd30320
Compare
Since there aren't tests yet could we add an undocumented/temp option to turn this off incase it breaks anyone? It could live in
We could remove this later once we know users aren't irritated by it Just an idea. LGTM either way |
fd30320
to
7205a94
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resist the junk drawer that is util.rs
so the only thing that needs to be done with this is making it only message once every 24 hours. right now, if your version of wrangler needs updating, it will print a message telling you to update after every single command. this shouldn't happen. Let's only bug folks about it once a day. |
Made version check only happen once a day
Fetches latest version if version file is older than a day
src/version/mod.rs
Outdated
use std::thread; | ||
use std::time::SystemTime; | ||
|
||
use crate::settings::global_user::get_wrangler_home_dir; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this probably does not belong to global_user, but idk where to put it just now.
ee9d346
to
2ecbd8c
Compare
2ecbd8c
to
1f4cc71
Compare
Fixes #397
every 24 hours, wrangler will ping crates.io and ask for the latest version. if latest version is greater than currently installed version, a message will be printed stating that the version needs updating. it saves the result from crates.io at
$WRANGLER_HOME/version.toml
which includes the latest version and the time it was last checked.