Add an --no-ui option to the ui version

The UI verison will just perform a sync as if it was the cli version
This commit is contained in:
Philip Kristoffersen
2022-04-13 15:30:15 +02:00
parent 6169f9b235
commit 6ee0da5663
2 changed files with 16 additions and 3 deletions
+9 -1
View File
@@ -29,5 +29,13 @@ async fn main() -> Result<(), Box<dyn Error>> {
#[cfg(feature = "ui")]
fn main() -> Result<(), Box<dyn Error>> {
ui::run_ui()
let mut args = std::env::args();
if args.len() > 1 && args.nth(1).unwrap_or_default() == "--no-ui" {
ui::run_sync();
Ok(())
}else{
ui::run_ui()
}
}