Skip to content

Commit

Permalink
Add version parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
osiewicz committed Jun 24, 2024
1 parent abcc874 commit 4eea78c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ async fn fetch_latest_version(package_name: &str) -> Option<MetadataFromRegistry

#[tokio::main]
async fn main() {
if let Some(_) = std::env::args().nth(1).filter(|arg| arg == "--version") {
println!("package-version-server {}", env!("CARGO_PKG_VERSION"));
return;
}
let stdin = tokio::io::stdin();
let stdout = tokio::io::stdout();

Expand Down

0 comments on commit 4eea78c

Please sign in to comment.