rust-lang/cargo — pull request #272 by nielsle (2014-07-27 19:14:02+00:00)
Title: Command env

cargo-version prints the environment variable CFG_VERSION that is defined in the makefile, but when you run cargo build, you get
'''
Fresh hammer v0.1.0 (https://github.com/wycats/hammer.rs#ref=c085c639)
Fresh hamcrest v0.1.0 (https://github.com/carllerche/hamcrest-rust.git#ref=05acf768)
Fresh toml v0.1.0 (https://github.com/alexcrichton/toml-rs#ref=a3c7f2c3)
Compiling cargo v0.0.1-pre (file:/home/niels/workspace/my_cargo)
src/bin/cargo-version.rs:32:5: 32:41 error: environment variable `CFG_VERSION` not defined
src/bin/cargo-version.rs:32 println!("{}", env!("CFG_VERSION"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
'''
Here is a quickfix to save the build.