(#3802) Ensure licensed feed stays disabled even when the license file is updated/changed#3803
Merged
Merged
Conversation
corbob
requested changes
Oct 15, 2025
gep13
reviewed
Oct 16, 2025
33f18ad to
fdeb67b
Compare
corbob
previously approved these changes
Oct 17, 2025
corbob
left a comment
Member
There was a problem hiding this comment.
This looks good to me. It behaves as expected. I've kicked off a targeted Test Kitchen run, once that finishes I'll get this merged in.
Previously, when changing licenses the licensed source entry was not retained at all and totally overwritten. This change ensures we at least retain whether the source was disabled when we overwrite it. Additionally, we ignore unsupported changes to the licensed source and overwrite them.
fdeb67b to
81482d4
Compare
72d56fd to
70079e8
Compare
Ensure that when a license is installed, CLI adds the chocolatey.licensed source correctly so that users can install the licensed extension. Additionally, when the license is removed, the feed should be removed, and if the license is swapped out, CLI should remember the disabled state of the licensed feed. Noticed and removed a superfluous `return` statement in one of the helper functions.
70079e8 to
a165b05
Compare
corbob
approved these changes
Oct 21, 2025
corbob
left a comment
Member
There was a problem hiding this comment.
This LGTM. I'll merge it in once we confirm the CI builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description Of Changes
chocolatey.licensedfeed before overwriting itMotivation and Context
See #3802
Testing
You will need two separate valid licenses in order to manually test the PR.
choco source listchocolatey.licensedfeed presentchoco source listchocolatey.licensedfeed should have been added automaticallychoco source disable -n chocolatey.licensedchoco source list[disabled]choco source list[disabled]choco source listchoco source listi. This is expected behaviour; CLI does not have a way to track the state of the licensed feed when it has been removed.
Operating Systems Testing
Win11
Change Types Made
Change Checklist
Related Issue
Fixes #3802