chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.04k stars 890 forks source link

UseEnhancedExitCodes not working (msi installation 2.3.0) #3473

Closed musklor closed 6 days ago

musklor commented 6 days ago

Checklist

What You Are Seeing?

I have set useEnhancedExitCodes to "on" but it doesn't work.

choco config set --name="'UseEnhancedExitCodes'" --value="'on'"

when i use again this command, i have exit code 0 instead of 2.

What is Expected?

Exit code 2

How Did You Get This To Happen?

choco config set --name="'UseEnhancedExitCodes'" --value="'on'"

System Details

No license Windows 2016 Powershell 5 and 7.2.19

Installed Packages

all

Output Log

No log

Additional Context

No response

gep13 commented 6 days ago

@musklor useEnhancedExitCodes is a feature, not a config value.

https://docs.chocolatey.org/en-us/configuration/#useenhancedexitcodes

It would be enabled by doing:

choco feature enable --name="useEnhancedExitCodes"

Can I ask where you got the idea that this was a config value that needed to be changed?

musklor commented 6 days ago

Oh my god, sorry.

gep13 commented 6 days ago

@musklor no need to apologise!

If this is something that isn't clear in the docs/blog, I would love to know where we can make improvements.