3 Commits

Author SHA1 Message Date
5ed9fd4710 set useragent header 2023-11-07 17:14:40 +01:00
4763759997 Merge pull request #42 from mxve/selfrestart
Selfrestart
2023-11-07 00:20:32 +01:00
6ebb421a7b fix linux 2023-11-06 22:33:58 +01:00
2 changed files with 9 additions and 1 deletions

View File

@ -19,6 +19,14 @@ pub async fn download_file(
) -> Result<(), String> { ) -> Result<(), String> {
let res = client let res = client
.get(url) .get(url)
.header(
"User-Agent",
&format!(
"AlterWare Launcher | github.com/{}/{}",
crate::global::GH_OWNER,
crate::global::GH_REPO
),
)
.send() .send()
.await .await
.or(Err(format!("Failed to GET from '{}'", &url)))?; .or(Err(format!("Failed to GET from '{}'", &url)))?;

View File

@ -13,7 +13,7 @@ pub fn self_update_available() -> bool {
} }
#[cfg(not(windows))] #[cfg(not(windows))]
pub fn run(_update_only: bool, _args: Vec<String>) { pub fn run(_update_only: bool) {
if self_update_available() { if self_update_available() {
println!("A new version of the AlterWare launcher is available."); println!("A new version of the AlterWare launcher is available.");
println!( println!(