Commit 701931846b

701931846bb72d9aa54c7f578a0b862f0fcfa1ec

parent: eb9c3aa32a

Unregistered key

vaw <git@nlih.de> · 2026-10-21 09:30 UTC
committer: <noreply@github.com>

Fix build outside of git worktrees (#825)

Layout: unified · split

Cargo.toml +1 −1
@@ -33,7 +33,7 @@ features = ["build"]
3333anyhow = "1.0"
3434bitflags = "2.3"
3535chrono = "0.4"
36clap = {version = "^4.6", features = ["derive"]}
36clap = { version = "^4.6", features = ["derive", "string"] }
3737clap_complete = "^4.6"
3838css-color-parser = "0.1.2"
3939dirs = "7.0"
src/config/mod.rs +13 −5
@@ -252,13 +252,21 @@ fn load_themes(
252252 Ok(themes)
253253}
254254
255const VERSION: &str = match option_env!("VERGEN_GIT_SHA") {
256 None => env!("CARGO_PKG_VERSION"),
257 Some(_) => concat!(env!("CARGO_PKG_VERSION"), " (", env!("VERGEN_GIT_SHA"), ")"),
258};
255struct IambVersion;
256
257impl From<IambVersion> for clap::builder::Str {
258 fn from(_: IambVersion) -> Self {
259 let version: Cow<'static, str> = match option_env!("VERGEN_GIT_SHA") {
260 None => env!("CARGO_PKG_VERSION").into(),
261 Some(sha) => format!("{} ({sha})", env!("CARGO_PKG_VERSION")).into(),
262 };
263
264 version.into()
265 }
266}
259267
260268#[derive(Parser)]
261#[clap(version = VERSION, about, long_about = None)]
269#[clap(version = IambVersion, about, long_about = None)]
262270#[clap(propagate_version = true)]
263271pub struct Iamb {
264272 #[clap(long, value_parser)]