Skip to content

Commit 2b81788

Browse files
authored
Merge pull request rust-lang#1220 from acmcarther/patch-1
Make CARGO_PKG_VERSION option_env!, rather than env!
2 parents 21861ea + d302c13 commit 2b81788

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ where
1919
);
2020

2121
let matches = App::new("bindgen")
22-
.version(env!("CARGO_PKG_VERSION"))
22+
.version(option_env!("CARGO_PKG_VERSION").unwrap_or("unknown"))
2323
.about("Generates Rust bindings from C/C++ headers.")
2424
.usage("bindgen [FLAGS] [OPTIONS] <header> -- <clang-args>...")
2525
.args(&[

0 commit comments

Comments
 (0)