forked from extern/nushell
Fix the version command to include the commit hash (#2390)
* Fix the version command to include the commit hash when it is _not_ empty * Format code
This commit is contained in:
parent
d65a38dd41
commit
a951edd0d5
@ -50,7 +50,7 @@ pub fn version(args: CommandArgs, _registry: &CommandRegistry) -> Result<OutputS
|
||||
UntaggedValue::string(clap::crate_version!()).into_value(&tag),
|
||||
);
|
||||
|
||||
let commit_hash = Some(GIT_COMMIT_HASH.trim()).filter(|x| x.is_empty());
|
||||
let commit_hash = Some(GIT_COMMIT_HASH.trim()).filter(|x| !x.is_empty());
|
||||
if let Some(commit_hash) = commit_hash {
|
||||
indexmap.insert(
|
||||
"commit_hash".to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user