mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 16:44:43 +01:00
Add CLI flag
This commit is contained in:
@@ -49,6 +49,7 @@ async fn parse_args(inp: &Vec<String>) -> Result<Args, ArgsError> {
|
||||
args.flag("h", "help", "Print various CLI args");
|
||||
args.flag("p", "proxy", "Start the proxy server");
|
||||
args.flag("G", "launch-game", "Launch the game");
|
||||
args.flag("o", "other-redirects", "Redirect other certain anime games");
|
||||
args.flag(
|
||||
"A",
|
||||
"no-admin",
|
||||
@@ -142,6 +143,10 @@ async fn parse_args(inp: &Vec<String>) -> Result<Args, ArgsError> {
|
||||
pathbuf.push("cultivation");
|
||||
pathbuf.push("ca");
|
||||
|
||||
if args.value_of("other_redirects")? {
|
||||
proxy::set_redirect_more();
|
||||
}
|
||||
|
||||
connect(8035, pathbuf.to_str().unwrap().to_string()).await;
|
||||
}
|
||||
|
||||
@@ -207,6 +212,7 @@ fn main() -> Result<(), ArgsError> {
|
||||
system_helpers::run_un_elevated,
|
||||
proxy::set_proxy_addr,
|
||||
proxy::generate_ca_files,
|
||||
proxy::set_redirect_more,
|
||||
release::get_latest_release,
|
||||
unzip::unzip,
|
||||
file_helpers::rename,
|
||||
|
||||
Reference in New Issue
Block a user