-
Notifications
You must be signed in to change notification settings - Fork 909
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
(#3327) Improves UX of Chocolatey Install without 4.8 #3329
Conversation
This needs to be checked. We still support PowerShell v2. |
I see nothing in my changes that is incompatible, to my knowledge, but I haven't run it in PS v2. |
As belt and braces, can you please run it in PS v2? Can you also ensure the script says 'Chocolatey CLI' and not 'Chocolatey'? |
Just to be clear, do you mean updating all instances of "Chocolatey" to "Chocolatey CLI" across the installation, or just bits that I've touched for this PR? Examples of "bits I've touched" (in yellow), all instances that are likely to want updating if we're going to make it consistent (orange), things unlikely in my opinion to want updating (red): (just noticed that strictly that second to last orange one I did add, but I based that on an existing message - would update them both if that were needed) |
@pauby Just chasing this up, as I'd like to try and get this merged before January. |
For consistency it would be good to change all of the |
6b45623
to
296b438
Compare
So, having an unexpected issue running this on the Windows 2012 (with PowerShell 3, no 4.8) system I have access to: Pretty neat! That said, it does recover after the reboot. I've not seen that issue before, even on other non-4.8 having systems. Any thoughts, @gep13? We thought it would be safe to run /version, but it seems not. 4.5.2 seems to be present on this system. I still like this change, and would prefer to not run choco.exe /version before the reboot (on a reboot-needing run) if this is happening, rather than give up on it. |
296b438
to
960360f
Compare
I wanted to highlight this issue here, which ist not fixed by this issue, but is related. |
Could we detect Server 2012, put some words in a different colour (to highlight it - maybe |
We could indeed! I'll give that a go, and we can see if we think it's enough. |
960360f
to
86b3a74
Compare
86b3a74
to
c0e703b
Compare
This commit introduces the idea that the dotnet installation needing a reboot should not immediately halt the Chocolatey installation, but instead proceed as far as possible - then prompt for a reboot.
Won't run in environments where DotNet 4.8 has been installed where running in PS<=3, due to the issues found when testing in those environments. Also improves the handling of errors, as previously we were never "reaching" an error due to the way Choco CLI's streams and exit codes work out.
c0e703b
to
547dab9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@JPRuskin I took the liberty of modifying your commit messages slightly (they were overrunning the standard that we use for commit messages) but other than that, this LGTM, and I will merge once the CI builds complete. |
Description Of Changes
This commit introduces the idea that the dotnet installation needing a reboot should not immediately halt the Chocolatey installation, but instead proceed as far as possible - then prompt for a reboot without throwing.
Motivation and Context
The install script currently throws after dotnet 4.8 is installed, which requires the user reboot and then re-run the install script. This, at least, reduces the need for an additional step post-reboot.
Testing
I downloaded the Chocolatey 2.2.2 package and used 7zip to overwrite
chocolateysetup.psm1
with my changes.Install.ps1 -ChocolateyDownloadUrl ~\Path\to\Choco.nupkg
(after execution policy / unblocking files)Operating Systems Testing
(no change to output)
Change Types Made
[ ] Bug fix (non-breaking change).[ ] Breaking change (fix or feature that could cause existing functionality to change).[ ] Documentation changes.Change Checklist
I am unsure if there is any reference to this behaviour in our documentation.
[ ] Tests to cover my changes, have been added.[ ] All new and existing tests passed?Related Issue
Fixes #3327