Skip to content
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

Rewrite #15

Merged
merged 49 commits into from
Oct 6, 2020
Merged

Rewrite #15

merged 49 commits into from
Oct 6, 2020

Conversation

ethanbergstrom
Copy link
Collaborator

@ethanbergstrom ethanbergstrom commented Nov 16, 2019

Refactor of the module with several feature additions

Added

Changed

  • To facilitate readability, broke up main module file into several function files
    • Grouped by 'public' functions used by PackageManagement vs 'private' functions that contain much of the shared logic for interacting with Chocolatey
    • Common logic, such as building commands, sending them to Chocolatey, and parsing results, are consolidated across multiple PackageManagement cmdlets into a single set of helper functions
  • Choco.exe installed automatically without any user prompts if -Force flag is passed
  • Uninstall behavior to also remove all unnecessary dependencies
  • Invokes Chocolatey via native API by default under PowerShell 5.1 and below for significant performance gains

Fixed

Removed

  • With Chocolatey-managed upgrades via the provider now available, the package provider no longer unilaterally upgrades Chocolatey on invocation if already installed
  • No longer displays progress bars in order to simplify passing data between functions via the pipeline in a way that's idiomatic to PowerShell

@ethanbergstrom ethanbergstrom marked this pull request as draft May 30, 2020 16:45
@ethanbergstrom ethanbergstrom marked this pull request as ready for review May 30, 2020 16:45
@ethanbergstrom
Copy link
Collaborator Author

ethanbergstrom commented May 30, 2020

@jianyunt would you be willing to give this a review? I've run out of ideas for contributions :)

I'm not listed as a project collaborator, so I cant formally add a review request to the PR.

Thanks!

@ethanbergstrom ethanbergstrom mentioned this pull request May 30, 2020
@Gregoorio
Copy link

Gregoorio commented Jun 26, 2020

Hello @ethanbergstrom,

I saw that there was a new version 1.2.0 of Chocolatier. I don't know if anyone has tested adding their own repository via "register-packagesource" commands, but I get an error in the 'name' parameter (see below)

PS C:\Windows\system32> Register-PackageSource -name TEST -location https://myrepo/nuget -provider Chocolatier -Trusted

WARNING: MSG:UnableToDownload «https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «»
WARNING: Unable to download the list of available providers. Check your internet connection.
Register-PackageSource : Cannot bind argument to parameter 'name' because it is an empty string.
At line:1 char:1

  • Register-PackageSource -name TEST -location https://myrepo ...
  •   + CategoryInfo          : InvalidData: (Microsoft.Power...erPackageSource:RegisterPackageSource) [Register-PackageSource], Exception
      + FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,New-PackageSource,Microsoft.PowerShell.PackageManagement.Cmdlets.RegisterPackageSour 
     ce
    
    

Can you confirm. Do you have that the same problem?
Is this a mistake on the side of the new provider Chocolatier 1.2.0 ?

This problem does not occur in a e.g. 1.0.4 Chocolatier version.

@ethanbergstrom
Copy link
Collaborator Author

Hey @Gregoorio,

I opened up a new issue on your behalf over on the Chocolatier project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants