We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
cargo --version --verbose
1 parent 579aa1a commit 50e1c1aCopy full SHA for 50e1c1a
src/bin/cargo.rs
@@ -128,7 +128,18 @@ fn execute(flags: Flags, config: &Config) -> CliResult<Option<()>> {
128
let _token = cargo::util::job::setup();
129
130
if flags.flag_version {
131
- println!("{}", cargo::version());
+ let version = cargo::version();
132
+ println!("{}", version);
133
+ if flags.flag_verbose > 0{
134
+ println!("release: {}.{}.{}",
135
+ version.major, version.minor, version.patch);
136
+ if let Some(ref cfg) = version.cfg_info {
137
+ if let Some(ref ci) = cfg.commit_info {
138
+ println!("commit-hash: {}", ci.commit_hash);
139
+ println!("commit-date: {}", ci.commit_date);
140
+ }
141
142
143
return Ok(None)
144
}
145
0 commit comments