feat(flag): skip-launcher-update
This commit is contained in:
parent
02f98c732c
commit
35da7817d1
10
src/main.rs
10
src/main.rs
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user