Open KZeronimo opened 6 years ago
I've tried to look at this @KZeronimo but the gist you listed is no longer there. Appreciate this was March when it was logged however.
Rather than using dism
to install Hyper-V use choco install Microsoft-Hyper-V-All -source windowsFeatures
- I've used this many times and have not come across the exit code you mentioned so it looks like Chocolatey is handling that.
It looks like exit code 3010 is "The requested operation is successful. Changes will not be effective until the system is rebooted."
Interesting as I've used Boxstarter to enable HyperV via the windowsfeatures source and don't remember that causing a problem.
@pauby looking at the earlier comment, I read that dism command as a logging output from Chocolatey from running the command you suggested. This does sounds like something that either Chocolatey should handle better (and maybe more recent versions of Chocolatey do), or that Boxstarter should intercept?
Interesting as I've used Boxstarter to enable HyperV via the windowsfeatures source and don't remember that causing a problem.
I've done the same and was surprised there was no issue with a reboot either
This does sounds like something that either Chocolatey should handle better (and maybe more recent versions of Chocolatey do), or that Boxstarter should intercept?
I agree. @gep13 Can you shed some light on this and suggest where you think this is best handled?
I'm wondering if Boxstarter will report any non-zero exit code from Chocolatey as a failure.
I'm running into the same problem installing package dotnetfx
version 4.7.2
which requires a reboot.
@jeremygaither if you add --ignorepackagecodes to choco install command, itwill treat 3080 exit code as valid. 3080 exit code if i remember correctly stands for "everything went fine, package asks for reboot". But any non-zero exit code will crash powershell scripts. Thats why you have to do this trick.
Notice: im not familiar with boxstarter, stumbled upon this while searching for other solution to my chocolatey install script. Someone may find this helpful :)
My question is regarding Boxstarter catching exit code 3010 from dism and presenting that as an error - is there anyway to let Boxstarter know this is a valid exit code and not report it as an error?
Repro
From elevated PS prompt exectute
The gist contains the following
cinst Microsoft-Hyper-V-All -source windowsFeatures
In the
boxstarter.log
you will see the following snippetFinally the output to the user is