feat(core): Add pre_uninstall and post_uninstall hooks#4957
feat(core): Add pre_uninstall and post_uninstall hooks#4957niheaven merged 5 commits intoScoopInstaller:developfrom
Conversation
Signed-off-by: Chawye Hsu <chawyehsu@hotmail.com>
Signed-off-by: Chawye Hsu <chawyehsu@hotmail.com>
|
What's the advantage of this over |
|
|
|
Also, the function signature and body for |
|
Basically they have all the same functionality as the Therefore to me they make sense semantically.
It's ok to do such refactoring. |
|
Just an FYI, 34 of this bucket's ~300 manifiests use |
Signed-off-by: Chawye Hsu <chawyehsu@hotmail.com>
Description
Introducing
pre_uninstallandpost_uninstallhooks.Motivation and Context
Closes #1868
Closes #4218
How Has This Been Tested?
hooktest1.json
{ "version": "0.2.0", "description": "A description", "homepage": "https://scoop.sh", "license": "UNLICENSE-or-MIT", "url": "https://github.com/ScoopInstaller/Scoop/archive/refs/tags/v0.2.0.tar.gz", "hash": "2cb9c0db892d13fed5bc49507deadc9c98f1038a96edba2d71c33a91bdb984a7", "extract_dir": "Scoop-0.2.0", "pre_uninstall": "Write-Host 'hook pre_uninstall executed.'", "post_uninstall": "Write-Host 'hook post_uninstall executed.'" }hooktest2.json
{ "version": "0.2.0", "description": "A description", "homepage": "https://scoop.sh", "license": "UNLICENSE-or-MIT", "architecture": { "64bit": { "url": "https://github.com/ScoopInstaller/Scoop/archive/refs/tags/v0.2.0.tar.gz", "hash": "2cb9c0db892d13fed5bc49507deadc9c98f1038a96edba2d71c33a91bdb984a7", "extract_dir": "Scoop-0.2.0", "pre_uninstall": "Write-Host 'hook pre_uninstall executed.'", "post_uninstall": "Write-Host 'hook post_uninstall executed.'" } } }Checklist:
developbranch.