feat(flag): skip-launcher-update

This commit is contained in:
mxve 2023-08-12 15:26:35 +02:00
parent 02f98c732c
commit 35da7817d1

View File

@ -241,10 +241,16 @@ fn launch(file_path: &PathBuf) {
}
fn main() {
self_update();
let mut args: Vec<String> = std::env::args().collect();
if !args.contains(&String::from("skip-launcher-update")) {
self_update();
} else {
args.iter()
.position(|r| r == "skip-launcher-update")
.map(|e| args.remove(e));
}
let games_json =
http::get_body_string(format!("{}/games.json?{}", MASTER, get_cache_buster()).as_str());
let games: Vec<Game> = serde_json::from_str(&games_json).unwrap();