lib/mixlib/install/backend/base.rb in mixlib-install-3.11.5 vs lib/mixlib/install/backend/base.rb in mixlib-install-3.11.11
- old
+ new
@@ -1,8 +1,8 @@
#
# Author:: Patrick Wright (<patrick@chef.io>)
-# Copyright:: Copyright (c) 2016 Chef, Inc.
+# Copyright:: Copyright (c) 2016-2018 Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -172,22 +172,15 @@
# the architecture extension in the filename of the url which changes based on product.
# Don't want to deal with that!
artifact_64 = artifacts.find { |a| a.platform == "windows" && a.architecture == "x86_64" }
artifact_32 = artifacts.find { |a| a.platform == "windows" && a.architecture == "i386" }
- # Attempt to clone windows artifacts only when a Windows 32 bit artifact exists
- if artifact_32
- new_artifacts.concat(clone_windows_desktop_artifacts(artifact_32))
-
- # Clone an existing 64 bit artifact
- if artifact_64
- new_artifacts.concat(clone_windows_desktop_artifacts(artifact_64))
-
- # Clone the 32 bit artifact when 64 bit doesn't exist
- else
- new_artifacts.concat(clone_windows_desktop_artifacts(artifact_32, architecture: "x86_64"))
- end
- end
+ # Clone an existing 64-bit artifact
+ new_artifacts.concat(clone_windows_desktop_artifacts(artifact_64)) if artifact_64
+ # Clone an existing 32-bit artifact
+ new_artifacts.concat(clone_windows_desktop_artifacts(artifact_32)) if artifact_32
+ # Clone the 32 bit artifact when 64 bit doesn't exist
+ new_artifacts.concat(clone_windows_desktop_artifacts(artifact_32, architecture: "x86_64")) if artifact_32 && !artifact_64
# Now discard the cloned artifacts if we find an equivalent native
# artifact
native_artifacts.each do |r|
new_artifacts.delete_if do |x|