File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,7 +149,9 @@ pub fn main() -> Result<()> {
149149 let mut engine = core:: corpus:: Engine :: open_or_create (
150150 db,
151151 core:: corpus:: engine:: State {
152- gitoxide_version : env ! ( "GITOXIDE_VERSION" ) . into ( ) ,
152+ gitoxide_version : option_env ! ( "GITOXIDE_VERSION" )
153+ . ok_or_else ( || anyhow:: anyhow!( "GITOXIDE_VERSION must be set in build-script" ) ) ?
154+ . into ( ) ,
153155 progress,
154156 trace_to_progress : trace,
155157 reverse_trace_lines,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use gitoxide_core as core;
44use gix:: bstr:: BString ;
55
66#[ derive( Debug , clap:: Parser ) ]
7- #[ clap( name = "gix" , about = "The git underworld" , version = env !( "GITOXIDE_VERSION" ) ) ]
7+ #[ clap( name = "gix" , about = "The git underworld" , version = option_env !( "GITOXIDE_VERSION" ) ) ]
88#[ clap( subcommand_required = true ) ]
99#[ clap( arg_required_else_help = true ) ]
1010pub struct Args {
Original file line number Diff line number Diff line change 11use std:: path:: PathBuf ;
22
33#[ derive( Debug , clap:: Parser ) ]
4- #[ clap( about = "The rusty git" , version = env !( "GITOXIDE_VERSION" ) ) ]
4+ #[ clap( about = "The rusty git" , version = option_env !( "GITOXIDE_VERSION" ) ) ]
55#[ clap( subcommand_required = true ) ]
66pub struct Args {
77 /// Do not display verbose messages and progress information
You can’t perform that action at this time.
0 commit comments