Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ fn open_or_activate_window(cx: &mut App, runtime: tokio::runtime::Handle) -> any
}

fn main() -> anyhow::Result<()> {
// Answer before any GUI setup, so package managers can probe the binary on
// a headless machine without a window opening.
if std::env::args()
.skip(1)
.any(|arg| arg == "--version" || arg == "-V")
{
println!("omasend {}", env!("CARGO_PKG_VERSION"));
return Ok(());
}
let executable = std::env::current_exe()?;
omasend::diagnostics::init();
let runtime = tokio::runtime::Builder::new_multi_thread()
Expand Down
Loading