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

Commit

Permalink
버전 확인 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieaer committed Aug 28, 2023
1 parent b487377 commit 4d57f61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,11 @@ fn print_author() {
}

fn auto_update() -> Result<(), Box<dyn std::error::Error>> {
let response = reqwest::blocking::get("https://api.github.com/repos/kieaer/Anti-ripper/releases/latest")?;
let client = Client::new();
let response = client.get("https://api.github.com/repos/kieaer/Anti-ripper/releases/latest")
.header(USER_AGENT, PROGRAM_USER_AGENT)
.send()
.unwrap();

if response.status().is_success() {
let release: serde_json::Value = response.json()?;
Expand All @@ -625,6 +629,8 @@ fn auto_update() -> Result<(), Box<dyn std::error::Error>> {
println!("{} 버전이 나왔습니다. (현재 {} 버전)", tag_name, build::PKG_VERSION);
println!("== 업데이트 내용");
println!("{}", description);
} else {
println!("현재 최신 버전입니다.");
}
} else {
println!("Failed to fetch release information");
Expand Down

0 comments on commit 4d57f61

Please # to comment.