panic on unknown CLI arguments

Currently silently ignores which is not helpful ...
This commit is contained in:
Ken Sedgwick
2025-02-05 10:43:21 -08:00
parent 201cfb2db1
commit 480f98eda4
7 changed files with 113 additions and 7 deletions

View File

@@ -60,6 +60,19 @@ pub async fn android_main(app: AndroidApp) {
setup_chrome(ctx, &notedeck.args(), notedeck.theme());
let damus = Damus::new(&mut notedeck.app_context(), &app_args);
// ensure we recognized all the arguments
let completely_unrecognized: Vec<String> = notedeck
.unrecognized_args()
.intersection(damus.unrecognized_args())
.cloned()
.collect();
assert!(
completely_unrecognized.is_empty(),
"unrecognized args: {:?}",
completely_unrecognized
);
notedeck.set_app(damus);
Ok(Box::new(notedeck))