Update golang cookbook

This commit is contained in:
2021-12-04 19:57:19 -06:00
parent a8948053d6
commit bbef38b6d6
130 changed files with 3548 additions and 1795 deletions

View File

@@ -104,7 +104,7 @@ module Ark
def wmi_property_from_query(wmi_property, wmi_query)
@wmi = ::WIN32OLE.connect('winmgmts://')
result = @wmi.ExecQuery(wmi_query)
return nil unless result.each.count > 0
return unless result.each.count > 0
result.each.next.send(wmi_property)
end

View File

@@ -42,7 +42,7 @@ module Ark
end
def sevenzip_binary
@tar_binary ||= "\"#{(node['ark']['sevenzip_binary'] || sevenzip_path_from_registry)}\""
@tar_binary ||= "\"#{node['ark']['sevenzip_binary'] || sevenzip_path_from_registry}\""
end
def sevenzip_path_from_registry

View File

@@ -9,7 +9,7 @@ module Ark
end
def cherry_pick
"#{tar_binary} #{args} #{resource.release_file} -C #{resource.path} #{resource.creates}#{strip_args}"
"#{tar_binary} #{args} #{resource.release_file} -C #{resource.path}#{strip_args} #{resource.creates}"
end
def initialize(resource)