mirror of
https://github.com/inspec/inspec
synced 2024-11-15 09:27:20 +00:00
api: set specinfra product_version + file_version to nil
whenever the label is empty (typically on all *nix systems) set it to nil instead of "" Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
parent
55bd535599
commit
526518fabd
1 changed files with 8 additions and 2 deletions
|
@ -265,11 +265,17 @@ module Vulcano::Backends
|
|||
end
|
||||
|
||||
def product_version
|
||||
Specinfra::Runner.run_command("(Get-Command '#{@path}').FileVersionInfo.ProductVersion").stdout.strip
|
||||
res = Specinfra::Runner.
|
||||
run_command("(Get-Command '#{@path}').FileVersionInfo.ProductVersion").
|
||||
stdout.strip
|
||||
res.empty? ? nil : res
|
||||
end
|
||||
|
||||
def file_version
|
||||
Specinfra::Runner.run_command("(Get-Command '#{@path}').FileVersionInfo.FileVersion").stdout.strip
|
||||
res = Specinfra::Runner.
|
||||
run_command("(Get-Command '#{@path}').FileVersionInfo.FileVersion").
|
||||
stdout.strip
|
||||
res.empty? ? nil : res
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue