Open torbengb opened 10 months ago
This isn't something we'd look to add to Chocolatey CLI FOSS. It's already solved using hook-scripts. But the solution would be to not have the package in your repository.
I can see the use case for this in an organizational context, so I'll move it over to the licensed repository.
already solved using hook-scripts
Oh, that would be wonderful! I could not find a hook that does this. Could you point me to it, please?
Let me clarify what I said:
already solved using hook-script functionality
That was indicated in the Discord chat you mentioned.
There is a repository of community submitted hook-scripts available, but there is only one in there at the moment. You could use that as a template.
Ah, so you're saying it can be done with hooks but that does not currently exist. I am trying to implement a hook like that, but it's new territory to me and I am not finished yet.
Ah, so you're saying it can be done with hooks but that does not currently exist.
Yes and no. What I'm saying is that the Discord discussion indicated that this could be done with hook-script functionality. The best place to ask about this would be back on Discord.
Checklist
Is Your Feature Request Related To A Problem? Please describe.
Describe The Solution. Why is it needed?
Similar to the ability to pin a certain version of a package, this feature request suggests the ability to blacklist certain packages:
Conceptual example:
choco disallow bisq*
would addbisq*
to a blacklist. (Note the use of*
as a wildcard here.)choco install bisq
would checkbisq
against the list and find a match, therefore it will fail the installation with an error "package is disallowed" and abort the installation.Additional Context
Josh King suggested on Discord that this could be implemented using a pre-install hook, and I am currently working on a proof of concept for that, in the form of a global pre-install hook.
Related Issues
No response