-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert PowerShell Functions to C# CmdLets #3477
Comments
Some of the above work was completed in the 2.3.0 release of Chocolatey CLI, where we introduced the concept of the |
I have marked this issue as a Breaking Change, as it does have the potential to have an impact on how some other systems work with Chocolatey CLI. |
This command replaces the Get-ChecksumValid helper function, adding an alias for compatibility purposes.
Add tests to ensure the behaviour of rewritten command matches the original behaviour.
This command replaces the Get-ChecksumValid helper function, adding an alias for compatibility purposes.
Add tests to ensure the behaviour of rewritten command matches the original behaviour.
This command replaces the Get-ChecksumValid helper function, adding an alias for compatibility purposes.
Add tests to ensure the behaviour of rewritten command matches the original behaviour.
@gep13 since it's been agreed this will be a breaking change, should we put this in the |
Before this issue is closed out completely, we should look to update the I'll add an entry to the task list here to track this as well. |
Additionally, I'm checking off |
This command replaces the Get-ChecksumValid helper function, adding an alias for compatibility purposes.
Add tests to ensure the behaviour of rewritten command matches the original behaviour.
This command replaces the Get-ChecksumValid helper function, adding an alias for compatibility purposes.
Add tests to ensure the behaviour of rewritten command matches the original behaviour.
This command replaces the Get-ChecksumValid helper function, adding an alias for compatibility purposes.
Add tests to ensure the behaviour of rewritten command matches the original behaviour.
Some cmdlets should support ShouldProcess, this change ensures that they do correctly support it, along with adding checks to the underlying methods to make it work as users will expect. As Chocolatey CLI already supports --dry-run itself, this is primarily going to be useful for effectively unit testing the commands.
Some cmdlets should support ShouldProcess, this change ensures that they do correctly support it, along with adding checks to the underlying methods to make it work as users will expect. As Chocolatey CLI already supports --dry-run itself, this is primarily going to be useful for effectively unit testing the commands.
Update-SessionEnvironment, Set-EnvironmentVariable, and (Un)Install-ChocolateyPath implement ShouldProcess, so we can use -WhatIf to verify their behaviour with unit tests.
Update-SessionEnvironment, Set-EnvironmentVariable, and (Un)Install-ChocolateyPath implement ShouldProcess, so we can use -WhatIf to verify their behaviour with unit tests.
Checklist
Is Your Feature Request Related To A Problem? Please describe.
Within the Chocolatey Licensed Extension, we extend the functionality that is provided by some of the Chocolatey PowerShell functions, for example for the Package Throttle feature, which means changing how the Get-WebFile function works.
Extending this functionality can be problematic as it deals with switching between PowerShell and C#, and there are no direct entry points to provide this additional functionality.
Describe The Solution. Why is it needed?
We should convert all the Chocolatey PowerShell Functions, i.e. the
Install-ChocolateyPath.ps1
to be a C# CmdLets.This will allow for better inheritance/overloading of Chocolatey functionality within things like the Chocolatey Licensed Extension, as well as providing the necessary entry points to extend the functionality as/when required.
In addition, this will prevent duplication of code between Chocolatey CLI and CLE.
Additional Context
N/A
Related Issues
Install-ChocolateyPath
adds a new entry to the PATH when part of it is already there #3318Tasks
The text was updated successfully, but these errors were encountered: