mirror of
https://github.com/pesde-pkg/pesde.git
synced 2024-12-12 11:00:36 +00:00
fix: re-add updates check caching
This commit is contained in:
parent
4866559025
commit
d52a9cb615
2 changed files with 19 additions and 2 deletions
|
@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Add back mistakenly removed updates check caching by @daimond113
|
||||
|
||||
## [0.5.0-rc.10] - 2024-11-16
|
||||
### Fixed
|
||||
- Fix `self-install` doing a cross-device move by @daimond113
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
use crate::cli::{bin_dir, config::read_config, files::make_executable, home_dir};
|
||||
use crate::cli::{
|
||||
bin_dir,
|
||||
config::{read_config, write_config, CliConfig},
|
||||
files::make_executable,
|
||||
home_dir,
|
||||
};
|
||||
use anyhow::Context;
|
||||
use colored::Colorize;
|
||||
use fs_err::tokio as fs;
|
||||
|
@ -70,7 +75,15 @@ pub async fn check_for_updates(reqwest: &reqwest::Client) -> anyhow::Result<()>
|
|||
{
|
||||
version
|
||||
} else {
|
||||
get_latest_remote_version(reqwest).await?
|
||||
let version = get_latest_remote_version(reqwest).await?;
|
||||
|
||||
write_config(&CliConfig {
|
||||
last_checked_updates: Some((chrono::Utc::now(), version.clone())),
|
||||
..config
|
||||
})
|
||||
.await?;
|
||||
|
||||
version
|
||||
};
|
||||
let current_version = current_version();
|
||||
|
||||
|
|
Loading…
Reference in a new issue