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

Allow usage of the chocolatey.org/install.ps1 to be overridden #550

Open
2 tasks done
vexx32 opened this issue Nov 8, 2023 · 7 comments
Open
2 tasks done

Allow usage of the chocolatey.org/install.ps1 to be overridden #550

vexx32 opened this issue Nov 8, 2023 · 7 comments
Assignees
Labels
0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue Improvement Issues that enhances existing functionality, or adds new features

Comments

@vexx32
Copy link
Member

vexx32 commented Nov 8, 2023

Checklist

  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my request.

Is Your Feature Request Related To A Problem? Please describe.

There are a couple places where the Chocolatey install script is pulled from https://chocolatey.org/install.ps1 where it would be good to allow overriding it in some fashion, so that we can test functionality or building Boxstarter prior to publishing updates to the script, and ensure we're not breaking the things in Boxstarter that use the install.ps1

Describe The Solution. Why is it needed?

Allow overriding the install.ps1 URL with either another URL or a file path, perhaps by looking up an environment variable or some other mechanism to permit it to be overridden in places where it is currently used.

Additional Context

No response

Related Issues

No response

@vexx32 vexx32 added the Improvement Issues that enhances existing functionality, or adds new features label Nov 8, 2023
@pauby
Copy link
Member

pauby commented Dec 5, 2023

@mwallner @flcdrg I think this has already been discussed in Discord, however, we need to remove the Chocolatey CLI installation script from Boxstarter and use the one at https://community.chocolatey.org/install.ps1.

Are either of you able to test Boxstarter using this new script?

@gep13 would it be possible to bring the new script in each time a release is done?

@mwallner
Copy link
Member

mwallner commented Dec 5, 2023

I can look into this in the next couple of days, note that we still need to be able to use the bundled/offline Installer in some scenarios - will try to come up with a list of the different options available for initial deployments.

@pauby pauby added the 0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue label Dec 21, 2023
@gep13
Copy link
Member

gep13 commented Jan 15, 2024

@pauby said...
@gep13 would it be possible to bring the new script in each time a release is done?

It could certainly be added to the release process to do this, would be better if this was automated though, rather than requiring human work.

@pauby
Copy link
Member

pauby commented Jan 16, 2024

@gep13 said

It could certainly be added to the release process to do this, would be better if this was automated though, rather than requiring human work.

I wasn't expecting this to be done manually but through automation.

@mwallner
Copy link
Member

imo the most efficient way of reducing the usage of https://chocolatey.org/install.ps1 would be as follows:

  • rip out old/unused code and modules (looking at you, Boxstarter.Testrunner, Boxstarter.Azure) - that'd reduce the number of different bootstrapping-paths
  • evaluate IF we may remove the usage of the boostrapping-url altogether, we need to be able to use the bundled version of chocolatey.nupkg anyway (remote + fully-contained scenarios)
  • replace hardcoded strings to the install script with a Get-BoxstarterChocolateyBootstrapURL function, inside the function, look if a env-var (something like env:BoxstarterChocoBootstrapUrl) is defined, otherwise fall back to the official url

@mwallner
Copy link
Member

mwallner commented Jul 1, 2024

@vexx32 / @pauby - how would you feel about adding ad $env:BoxstarterChocoBootstrapUrl => if this is set prior to bootstrapping Boxstarter, it will use this environment variable to fetch the chocolatey install script from.

NOTE: if choco is being bootstrapped from https://chocolatey.org/install.ps1, also .net framework 4.5 (4.0.30319) will be installed beforehand atm. (which is outdated as minimum requirement iirc)

@pauby
Copy link
Member

pauby commented Jul 2, 2024

how would you feel about adding ad $env:BoxstarterChocoBootstrapUrl => if this is set prior to bootstrapping Boxstarter, it will use this environment variable to fetch the chocolatey install script from.

This sounds like a good idea to me.

@mwallner mwallner self-assigned this Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - _Triaging Issue is accepted, but a milestone has yet to be added for the issue Improvement Issues that enhances existing functionality, or adds new features
Projects
None yet
Development

No branches or pull requests

4 participants