Skip to content

PSv5 backward compatibility for Invoke-WebRequest #48

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

Merged

Conversation

TinaMor
Copy link
Contributor

@TinaMor TinaMor commented Jan 30, 2025

PR description

What does this PR do

This PR fixes a backward compatibiltu issues with PowerShell v5.1. This version's Invoke-WebRequest command does not have the flags -MaximumRetryCount and -RetryIntervalSec.

Github issue

[BUG] [CTK v1.0.0] Install error with downloads #39

Relevant links

Invoke-WebRequest PSv5.1
Invoke-WebRequest PSv7.4 and above

Checklist

As part of our commitment to engineering excellence, before submitting this PR, please make sure:

  • You've tested this code in both Desktop & Server environments and AMD & ARM64 enviroments (functional testing).
  • You've added unit tests for new code.
  • You've added/updated documentation in the cmdlet docs, command-reference.md and the modules help files.
  • You've reviewed the PR/code best practices defined in the CONTRIBUTING.md.

In addition, after this PR has been reviewed, please agree to:

  • If changes have been made to your PR in the process of addressing comments, please make sure to test again the final version in both AMD and ARM64 environments.
  • Validate your changes have not introduced any regressions.

billywr
billywr previously approved these changes Feb 3, 2025
Copy link
Contributor

@CharityKathure CharityKathure left a comment

Choose a reason for hiding this comment

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

Should manual retry logic be implemented instead of removing MaximumRetryCount and RetryIntervalSec to maintain retry while ensuring backward compatibility?

@TinaMor TinaMor marked this pull request as draft February 4, 2025 07:41
@TinaMor TinaMor force-pushed the tinamor/fix-backwardcompat-invoke-webrequest branch 2 times, most recently from fd6e4b4 to 8420438 Compare February 4, 2025 08:55
@TinaMor TinaMor force-pushed the tinamor/fix-backwardcompat-invoke-webrequest branch from 8420438 to 673de02 Compare February 4, 2025 08:58
@TinaMor TinaMor marked this pull request as ready for review February 4, 2025 09:05
Copy link
Contributor

@CharityKathure CharityKathure left a comment

Choose a reason for hiding this comment

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

LGTM

@TinaMor TinaMor linked an issue Feb 4, 2025 that may be closed by this pull request
@TinaMor TinaMor merged commit e618a28 into microsoft:main Feb 4, 2025
6 checks passed
@TinaMor TinaMor deleted the tinamor/fix-backwardcompat-invoke-webrequest branch February 4, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] [CTK v1.0.0] Install error with downloads
3 participants