chocolatey-licensed-issues
chocolatey-licensed-issues copied to clipboard
New License Enables Licensed Feed Even When Originally Disabled
What You Are Seeing?
When a new Chocolatey license is installed on a machine it is re-adding the chocolatey.licensed source. The issue is, it is re-enabling this source even if before the new license file is placed this source was marked as disabled.
What is Expected?
If the chocolatey.licensed source is marked as disabled. When adding a new license file Chocolatey should respect the config statement of the source being disabled and simply change the auth to the feed with the new license id value only.
Chocolatey should only update the sources saved auth and not re-enable the source.
How Did You Get This To Happen? (Steps to Reproduce)
- Have a licensed Chocolatey instance (chocolatey, chocolatey.extension, and a business license installed)
- Disable the chocolatey.licensed source
- Place a newer license file at C:\ProgramData\chocolatey\license
- Run
choco source list
and see that when Chocolatey reads the new license file it updates the source auth an re-enables it.
System Details
- Operating System: Windows Server 2022
- Windows PowerShell Version: 5.1
- Chocolatey CLI Version: 2.2.0
- Chocolatey Licensed Extension version: 6.1.0
- Chocolatey License type (Professional / Business / ?): Issue is seen with both Pro and Business licenses
- Terminal/Emulator: Windows PowerShell
Output Log
N/A as didn't see any relevant parts. Happy to supply if needed.
Workarounds
- Run a
choco source disable -n chocolatey.licensed
after placing/deploying your new license file.
Proposed Solution
- Likely reference the current state of the source(enabled or disabled) and bake that into the code behind Chocolatey CLI/Extension that is auto updating the source when a new license is placed.
Related Issues and Tickets
Done Checklist
- [ ] Documentation has been updated.
- [ ] Automated tests have been added to cover this bug.
- [ ] Manual tests have been added to cover this bug.
- [ ] Title is suitable for using in Release Notes?
┆Issue is synchronized with this Gitlab issue by Unito