This commit is contained in:
sxyazi 2024-05-08 14:13:13 +08:00
parent c1998d577a
commit 19e3858c6b
No known key found for this signature in database

View file

@ -6,7 +6,7 @@ use clap::Parser;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
if std::env::args_os().any(|s| s == "-V" || s == "--version") {
if std::env::args_os().nth(1).is_some_and(|s| s == "-V" || s == "--version") {
println!(
"Ya {} ({} {})",
env!("CARGO_PKG_VERSION"),