Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.

Commit a042abf

Browse files
authored
fix(worker): use correct version env var (#512)
1 parent b717431 commit a042abf

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

crates/worker/src/cli/command.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ use tokio::sync::RwLock;
3232
use tokio_util::sync::CancellationToken;
3333
use url::Url;
3434

35+
const APP_VERSION: &str = match option_env!("WORKER_VERSION") {
36+
Some(version) => version,
37+
None => env!("CARGO_PKG_VERSION"),
38+
};
39+
3540
#[derive(Parser)]
36-
#[command(author, version, about, long_about = None)]
41+
#[command(author, version = APP_VERSION, about, long_about = None)]
3742
pub struct Cli {
3843
#[command(subcommand)]
3944
pub command: Commands,
@@ -216,7 +221,7 @@ pub async fn execute_command(
216221
};
217222

218223
let mut recover_last_state = !(*no_auto_recover);
219-
let version = option_env!("WORKER_VERSION").unwrap_or(env!("CARGO_PKG_VERSION"));
224+
let version = APP_VERSION;
220225
Console::section("🚀 PRIME WORKER INITIALIZATION - beta");
221226
Console::info("Version", version);
222227
/*

0 commit comments

Comments
 (0)