mirror of
https://github.com/inspec/inspec
synced 2024-12-11 22:02:47 +00:00
Flatten a conditional
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
bba6d70b3b
commit
b6cb418af6
1 changed files with 2 additions and 6 deletions
|
@ -102,12 +102,8 @@ module Inspec::Fetcher
|
|||
|
||||
def perform_shasum(target)
|
||||
return @archive_shasum if @archive_shasum
|
||||
|
||||
if File.exist?(target)
|
||||
@archive_shasum = OpenSSL::Digest::SHA256.digest(File.read(target)).unpack("H*")[0]
|
||||
else
|
||||
raise Inspec::FetcherFailure, "Profile dependency local path '#{target}' does not exist"
|
||||
end
|
||||
raise(Inspec::FetcherFailure, "Profile dependency local path '#{target}' does not exist") unless File.exist?(target)
|
||||
@archive_shasum = OpenSSL::Digest::SHA256.digest(File.read(target)).unpack("H*")[0]
|
||||
end
|
||||
|
||||
def resolved_source
|
||||
|
|
Loading…
Reference in a new issue