Print correct version of bin tools (#183)
* Print correct version of bin tools Not something important, but I use these tools for some testing and they print wrong version with --version flag.
This commit is contained in:
committed by
Dan Gohman
parent
210e959333
commit
89cd327c97
@@ -86,10 +86,11 @@ fn read_wasm_file(path: PathBuf) -> Result<Vec<u8>, io::Error> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let version = env!("CARGO_PKG_VERSION");
|
||||||
let args: Args = Docopt::new(USAGE)
|
let args: Args = Docopt::new(USAGE)
|
||||||
.and_then(|d| {
|
.and_then(|d| {
|
||||||
d.help(true)
|
d.help(true)
|
||||||
.version(Some(String::from("0.0.0")))
|
.version(Some(String::from(version)))
|
||||||
.deserialize()
|
.deserialize()
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|e| e.exit());
|
.unwrap_or_else(|e| e.exit());
|
||||||
|
|||||||
@@ -191,10 +191,11 @@ fn compute_environ(flag_env: &[String]) -> Vec<(String, String)> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let version = env!("CARGO_PKG_VERSION");
|
||||||
let args: Args = Docopt::new(USAGE)
|
let args: Args = Docopt::new(USAGE)
|
||||||
.and_then(|d| {
|
.and_then(|d| {
|
||||||
d.help(true)
|
d.help(true)
|
||||||
.version(Some(String::from("0.0.0")))
|
.version(Some(String::from(version)))
|
||||||
.deserialize()
|
.deserialize()
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|e| e.exit());
|
.unwrap_or_else(|e| e.exit());
|
||||||
|
|||||||
@@ -64,10 +64,11 @@ struct Args {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let version = env!("CARGO_PKG_VERSION");
|
||||||
let args: Args = Docopt::new(USAGE)
|
let args: Args = Docopt::new(USAGE)
|
||||||
.and_then(|d| {
|
.and_then(|d| {
|
||||||
d.help(true)
|
d.help(true)
|
||||||
.version(Some(String::from("0.0.0")))
|
.version(Some(String::from(version)))
|
||||||
.deserialize()
|
.deserialize()
|
||||||
})
|
})
|
||||||
.unwrap_or_else(|e| e.exit());
|
.unwrap_or_else(|e| e.exit());
|
||||||
|
|||||||
Reference in New Issue
Block a user