Skip to content

Commit 7bfef49

Browse files
authored
feat(scoop-update): Add support for pre_uninstall and post_uninstall (#5085)
1 parent ca19d7b commit 7bfef49

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- **core:** Improve argument concatenation in `Invoke-ExternalCommand` ([#5065](https://github.com/ScoopInstaller/Scoop/issues/5065))
77
- **install:** Show bucket name while installing an app ([#5075](https://github.com/ScoopInstaller/Scoop/issues/5075))
88
- **scoop-status:** Add flag to disable remote checking ([#5073](https://github.com/ScoopInstaller/Scoop/issues/5073))
9+
- **scoop-update:** Add support for `pre_uninstall` and `post_uninstall` ([#5085](https://github.com/ScoopInstaller/Scoop/issues/5085))
910

1011
### Bug Fixes
1112

libexec/scoop-update.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ function update($app, $global, $quiet = $false, $independent, $suggested, $use_c
243243
$dir = versiondir $app $old_version $global
244244
$persist_dir = persistdir $app $global
245245

246+
Invoke-HookScript -HookType 'pre_uninstall' -Manifest $old_manifest -Arch $architecture
247+
246248
#region Workaround for #2952
247249
if (test_running_process $app $global) {
248250
return
@@ -272,6 +274,8 @@ function update($app, $global, $quiet = $false, $independent, $suggested, $use_c
272274
}
273275
}
274276

277+
Invoke-HookScript -HookType 'post_uninstall' -Manifest $old_manifest -Arch $architecture
278+
275279
if ($bucket) {
276280
# add bucket name it was installed from
277281
$app = "$bucket/$app"

0 commit comments

Comments
 (0)