Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) Follow redirects when curling MSI #176

Merged
merged 2 commits into from
Feb 23, 2022
Merged

Conversation

joshcooper
Copy link
Contributor

Add --location curl option, otherwise we save the redirect HTML page as the
msi, try to install that, and of course msiexec fails with 1620 since the
package is invalid.

@codecov
Copy link

codecov bot commented Feb 23, 2022

Codecov Report

Merging #176 (32ad322) into master (74d77c9) will not change coverage.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #176   +/-   ##
=======================================
  Coverage   77.77%   77.77%           
=======================================
  Files          15       15           
  Lines        1602     1602           
=======================================
  Hits         1246     1246           
  Misses        356      356           
Impacted Files Coverage Δ
lib/beaker-puppet/install_utils/foss_utils.rb 70.24% <50.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 74d77c9...32ad322. Read the comment docs.

@joshcooper
Copy link
Contributor Author

      wiry-broadcast.delivery.puppetlabs.net 17:56:27$ curl --location -o "C:\Windows\TEMP\puppet-agent-x64-latest.msi" -O http://nightlies.puppet.com/downloads/windows/puppet6-nightly/puppet-agent-x64-latest.msi
          % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                                 Dload  Uplo        ad   Total   Spent    Left  Speed
          0             0    0             0    0     0              0      0 -        -:--:--  0:0        0:02 --:--:        --     0        100   287  100   287    0     0    118      0  0:00:02  0:00:02 --:--:-- 23916
         22 43.2M   22  9.9M    0     0  3388k      0  0:00:13  0:00:02  0:00:11 3388k        100 43.2M  100 43.2M    0     0  11.0M      0  0:00:03  0:00:03 --:--:-- 35.7M

Add `--location` curl option, otherwise we save the redirect HTML page as the
msi, try to install that, and of course msiexec fails with 1620 since the
package is invalid.
Copy link
Contributor

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the logic in #173 maybe we can switch to long options here too?

lib/beaker-puppet/install_utils/foss_utils.rb Outdated Show resolved Hide resolved
spec/beaker-puppet/install_utils/foss_utils_spec.rb Outdated Show resolved Hide resolved
spec/beaker-puppet/install_utils/foss_utils_spec.rb Outdated Show resolved Hide resolved
@bastelfreak
Copy link
Contributor

@joshcooper thanks for the PR. we try to provide those from forks to reduce the amount of direct commits into the vox pupuli reason. please do that in the future if possible.

@bastelfreak bastelfreak merged commit 298d2ac into master Feb 23, 2022
@bastelfreak bastelfreak deleted the follow_redirect_msi branch February 23, 2022 08:17
@joshcooper joshcooper restored the follow_redirect_msi branch February 23, 2022 14:50
@joshcooper joshcooper deleted the follow_redirect_msi branch February 23, 2022 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants