-
Notifications
You must be signed in to change notification settings - Fork 163
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
Provide clarity about how Chocolatey is used/executed when running under Boxstarter #369
Comments
I've just checked boxstarter internals,- and as far as I can see it always uses it's "own" version of Chocolatey. |
Installing Chocolatey would be useful if a user wants to update his packages later on. This case could be covered by adding |
Here's one thing to keep in mind: Some of Chocolatey's features are not available if Boxstarter does not install a local version of Chocolatey. The You can reproduce this on a fresh Windows machine (without Chocolatey) with this Boxstarter script (and a copy of Boxstarter, as described in my initial post above): cinst bumpy.portable
Update-SessionEnvironment
bumpy Which results in the error "bumpy not found", even though Packages such as cinst vscode
Update-SessionEnvironment
code --install-extension cake-build.cake-vscode works. Here is a working snippet: cinst chocolatey
cinst bumpy.portable
Update-SessionEnvironment
bumpy Edit: Should this particular problem be tracked as a new issue? I can think of two solutions to this problem:
|
@fwinkelbauer This would still be resolved by installing Chocolatey manually? |
@pauby I have just updated the above comment. Yes, installing Chocolatey resolves this problem. But this behaviour might be confusing for some users, as this snippet: cinst bumpy.portable
Update-SessionEnvironment
bumpy will work on a machine with Chocolatey and Boxstarter installed, but it will fail when using a standalone version of Boxstarter. |
@fwinkelbauer I agree. Maybe just an update to the docs in this case as @mwallner suggested? |
Which would be option number three, yes, that would work as well. Another option would be that a user manually adds the Choco bin folder to |
That's for the user to decide though. It's not something we'd suggest as it's a kludge. I'm not in favour of options 1 and 2 as that changes expected behaviour. What would be an option I think we should look at is Boxstarter installing Chocolatey itself for a future version (perhaps v3). @mwallner As you've looked at this above what are your thoughts? |
Something we can consider yes - but we'd be dropping the possibility to install / "push install" packages without actually installing Chocolatey... What about yet another option: just adding
I kind of don't want to drop the ability to remote-push Chocolatey packages via Boxstarter without forcing the remote computer to install Chocolatey itself. CC @ferventcoder - if you've got a preference here, please let us know ;-) |
That's pretty much what I was trying to say in my above comment. Adding the bin folder to |
Do we know why that's not being done? I'd rather understand that before we just go ahead and fix it. |
My understanding is that this is not happening because Chocolatey is not installed when using the standalone version of Boxstarter. Installing Boxstarter using any other method includes an installation of Chocolatey: 1. Using Chocolatey
2. Using the ZIP Archive provided on GitHubThis approach uses the Boxstarter bootstrapper, see below. 3. Using the Boxstarter BootstrapperThe Boxstarter bootstrapper ensures that Chocolatey is installed. 4. ClickOnceThe ClickOnce launcher seems to utilize the |
I'll try to summarize what we already know, maybe this will help to clear things up. Any method described here which installs Boxstarter, installs Chocolatey as part of the "bootstrapping" (see my post above). The Powershell doc for Invoke-ChocolateyBoxstarter and Install-BoxstarterPackage claim that they will ensure Chocolatey is installed - which is currently not true. These installation checks are only done when using the bootstrapper. The section "Running an Install from a network share or external media" here describes a method to install packages on a Computer without bootstrapping Boxstarter or Chocolatey. This is the only way (that I am aware of) in which Chocolatey is not installed on a computer. Boxstarter uses its own copy of Chocolatey to install packages. This approach works fine for package installation, but creates problems later on because any shim that Chocolatey creates is not available on In short:
|
My thoughts on this are to update the documentation to make it clear that Chocolatey is NOT installed by I'm assuming that |
🎉 This issue has been resolved in version 3.0.0 🎉 The release is available on:
Your GitReleaseManager bot 📦🚀 |
What You Are Seeing?
The documentation of Invoke-ChocolateyBoxstarter and Install-BoxstarterPackage.ps1 state that Boxstarter will install Chocolatey on the machine if it does not exist. Using any of these functions on a fresh machine (using a local copy of Boxstarter) does not install
choco.exe
.What is Expected?
The above functions should either install Chocolatey, or the documentation should be updated.
How Did You Get This To Happen? (Steps to Reproduce)
I am using this repository to create a
box.zip
file which contains a copy of Boxstarter. Runninginstall-mybox.ps1
(included inbox.zip
) will install several Chocolatey packages on the machine (C:\ProgramData\chocolatey\lib
), but there seems to be noC:\ProgramData\chocolatey\bin\choco.exe
.The text was updated successfully, but these errors were encountered: