Make rustfmt-bin's CARGO_PKG_VERSION envvar optional

This commit is contained in:
Alex McArther 2018-01-23 07:55:50 -08:00
parent 8e6ee4a762
commit 6d294e6bcb

View file

@ -387,7 +387,7 @@ fn print_usage_to_stdout(opts: &Options, reason: &str) {
fn print_version() {
println!(
"{}-nightly{}",
env!("CARGO_PKG_VERSION"),
option_env!("CARGO_PKG_VERSION").unwrap_or("unknown"),
include_str!(concat!(env!("OUT_DIR"), "/commit-info.txt"))
)
}