chocolatey-community / chocolatey-hooks

Chocolatey Community managed repository for hook packages.
https://docs.chocolatey.org/en-us/features/hook
Apache License 2.0
1 stars 7 forks source link

(#2) Add hook package to cleanup desktop shortcuts. #3

Closed TheCakeIsNaOH closed 1 year ago

TheCakeIsNaOH commented 1 year ago

Description Of Changes

Adds a hook package that removes desktop shortcuts created during package install scripts.

Motivation and Context

See #2

Testing

  1. Install a package without an install script choco install balcon and validate that it prints out a message that it is skipping desktop cleanup because there is not install script.
  2. Clean the desktop of all shortcuts and install a package that creates a desktop shortcut (choco install firefox) and validate that the hook removes the shortcut.
  3. Replace the firefox shortcut on the desktop, force install firefox (choco install firefox -f) and validate that it does not remove the recreated shortcut.
  4. Install packages with the firefox shortcut still on the desktop, and validate that it removes shortcuts from when multiple packages are installed with one command (choco install balabolka foobar200)

Change Types Made

Related Issue

Fixes #2

Change Checklist

TheCakeIsNaOH commented 1 year ago

Well, this is ready for review now.

gep13 commented 1 year ago

@TheCakeIsNaOH I have just taken this for a spin, and this looks really good to me, thank you very much for putting this together!

I will leave this open for a final review from @corbob and/or @vexx32 and once they are happy we can get this merged.

I have a final conversation that I need to have with @pauby regarding the versioning of the first package version, but that should happen this morning, and once a decision has been made, I can get the version number updated, if required.

Thanks again for pulling this together! Looking forward to showing this off tomorrow on the stream!

gep13 commented 1 year ago

@TheCakeIsNaOH thanks for getting this package created!