diff --git a/bin/todo_desktop.dart b/bin/todo_desktop.dart index 63beb65..96f98bd 100644 --- a/bin/todo_desktop.dart +++ b/bin/todo_desktop.dart @@ -128,7 +128,12 @@ Future _recoverPort( // and window count goes 1 -> 2). A duplicate window is the right // trade-off anyway: both share this one server and one IndexedDB, and // typing `todo` to get nothing visible would be worse. - final opening = !args.contains('--no-browser'); + // --provision-sync-account counts as "do not open a window" too: it + // is a headless setup step, and opening one here defeated the whole + // point (it landed fullscreen on the primary monitor). + final opening = + !args.contains('--no-browser') && + !args.contains('--provision-sync-account'); stdout.writeln( 'todo is already running (pid $pid)' '${opening ? '; opening a window.' : '.'}',