File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,9 @@ pub fn main() -> Result<()> {
149
149
let mut engine = core:: corpus:: Engine :: open_or_create (
150
150
db,
151
151
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 ( ) ,
153
155
progress,
154
156
trace_to_progress : trace,
155
157
reverse_trace_lines,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use gitoxide_core as core;
4
4
use gix:: bstr:: BString ;
5
5
6
6
#[ 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" ) ) ]
8
8
#[ clap( subcommand_required = true ) ]
9
9
#[ clap( arg_required_else_help = true ) ]
10
10
pub struct Args {
Original file line number Diff line number Diff line change 1
1
use std:: path:: PathBuf ;
2
2
3
3
#[ 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" ) ) ]
5
5
#[ clap( subcommand_required = true ) ]
6
6
pub struct Args {
7
7
/// Do not display verbose messages and progress information
You can’t perform that action at this time.
0 commit comments