Files
aurora-curator/src-tauri/src/main.rs
T

18 lines
847 B
Rust
Raw Normal View History

// Prevents an additional console window on Windows in release builds.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
// `-rename`/`-h`/`--help` on the command line means this is a scripted CLI
// invocation, not a normal double-click GUI launch - see
// `aurora_curator_core::cli`'s module doc. Checked with the exact same predicate
// `cli::parse_args` itself uses internally, so this can never drift out of sync
// with what actually triggers CLI mode. No args at all (the normal launch case)
// falls straight through to the unchanged GUI path below.
let args: Vec<String> = std::env::args().skip(1).collect();
if aurora_curator_core::cli::looks_like_cli_invocation(&args) {
std::process::exit(aurora_curator_lib::run_cli(args));
}
aurora_curator_lib::run();
}