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

(#18) Use more versatile URL handling for getting the chocolatey install script URL #38

Merged
merged 3 commits into from
May 5, 2021

Conversation

vexx32
Copy link
Member

@vexx32 vexx32 commented Apr 9, 2021

Two main improvements have been made in this PR:

  1. When checking the URL ends with .ps1, make sure we use a non-case-sensitive check (i.e., a URL of the form https://server.com/example/chocolatey.PS1 should still work.
  2. If it doesn't end in PS1, look for known patterns in the URL, like the common Nexus pattern of /repository/* which indicates the script should look in a specific repository, rather than just assuming the script is definitely hosted in the server root.

This resolves #18 at least for some of the common cases. We can add more complex handling here if needed in future.

@vexx32 vexx32 added this to the 1.1.x milestone Apr 9, 2021
@adilio adilio self-requested a review May 5, 2021 19:45
Copy link
Contributor

@adilio adilio left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@vexx32 vexx32 merged commit 1f73c5a into master May 5, 2021
@vexx32 vexx32 deleted the 18/CaseInsensitiveUrlCheck branch May 5, 2021 19:52
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.

win_chocolatey: ChocolateyInstall.ps1 from Internal Repositories fails (Sonatype Nexus)
3 participants