Skip to content

Commit ab796fb

Browse files
committed
Apply the suggestions from coderabbitai
1 parent c511cdb commit ab796fb

File tree

3 files changed

+23
-21
lines changed

3 files changed

+23
-21
lines changed

bucket/coretemp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
],
4343
"uninstaller": {
4444
"script": [
45-
"Stop-Process -Name 'Core Temp' -ErrorAction SilentlyContinue",
45+
"Stop-Process -Name 'Core Temp' -Force -ErrorAction SilentlyContinue",
4646
"Start-Sleep -Milliseconds 1500"
4747
]
4848
},

bucket/mp3tag.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,16 @@
5454
"data",
5555
"mp3tag.cfg"
5656
],
57-
"pre_uninstall": [
58-
"Copy-Item \"$dir\\export\\*\" \"$persist_dir\\export\" -Recurse -ErrorAction SilentlyContinue",
59-
"if (Test-Path 'HKLM:\\SOFTWARE\\Classes\\Directory\\shellex\\ContextMenuHandlers\\Mp3tagShell\\') {",
60-
" if (!(is_admin)) { error \"$app requires admin rights to $cmd\"; break }",
61-
" Start-Process 'regsvr32' -ArgumentList @('/u', \"$dir\\Mp3tagShell.dll\", '/s') -Wait",
62-
" Start-Process 'regsvr32' -ArgumentList @('/u', \"$dir\\Mp3tagShell32.dll\", '/s') -Wait",
63-
"}"
64-
],
57+
"pre_uninstall": "Copy-Item \"$dir\\export\\*\" \"$persist_dir\\export\" -Recurse -ErrorAction SilentlyContinue",
6558
"uninstaller": {
6659
"script": [
67-
"Stop-Process -Name 'explorer' -Force -ErrorAction SilentlyContinue",
68-
"Start-Sleep -Milliseconds 1500"
60+
"if (Test-Path -Path 'HKLM:\\SOFTWARE\\Classes\\Directory\\shellex\\ContextMenuHandlers\\Mp3tagShell') {",
61+
" if (-not (is_admin)) { abort \"`n[ERROR] $app requires admin rights to $cmd.\" }",
62+
" Start-Process 'regsvr32' -ArgumentList @('/u', \"$dir\\Mp3tagShell.dll\", '/s') -Wait",
63+
" Start-Process 'regsvr32' -ArgumentList @('/u', \"$dir\\Mp3tagShell32.dll\", '/s') -Wait",
64+
" Stop-Process -Name 'explorer' -Force -ErrorAction SilentlyContinue",
65+
" Start-Sleep -Milliseconds 1500",
66+
"}"
6967
]
7068
},
7169
"checkver": {

bucket/powertoys.json

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"license": "MIT",
66
"notes": [
77
"Add PowerToys context menu option by running:",
8-
"Invoke-Expression -Command \"& `\"$dir\\install-context.ps1`\"\""
8+
"Invoke-Expression -Command \"& `\"$dir\\install-context.ps1`\"\"",
9+
"",
10+
"If an error occurs when updating or uninstalling, execute the following command then retry:",
11+
"`Stop-Process -Name 'explorer'`"
912
],
1013
"architecture": {
1114
"64bit": {
@@ -53,12 +56,6 @@
5356
" Invoke-Expression -Command \"& `\"$dir\\install-context.ps1`\"\"",
5457
"}"
5558
],
56-
"shortcuts": [
57-
[
58-
"PowerToys.exe",
59-
"PowerToys"
60-
]
61-
],
6259
"uninstaller": {
6360
"script": [
6461
"$regpath = 'HKCU:\\Software\\Classes\\powertoys'",
@@ -67,11 +64,18 @@
6764
"}",
6865
"if (Test-Path -Path $regpath) {",
6966
" Invoke-Expression -Command \"& `\"$dir\\uninstall-context.ps1`\"\"",
70-
"}",
71-
"Stop-Process -Name 'explorer' -Force -ErrorAction SilentlyContinue",
72-
"Start-Sleep -Milliseconds 1500"
67+
" if ($cmd -ne 'uninstall') {",
68+
" New-Item -Path $regpath -Force | Out-Null",
69+
" }",
70+
"}"
7371
]
7472
},
73+
"shortcuts": [
74+
[
75+
"PowerToys.exe",
76+
"PowerToys"
77+
]
78+
],
7579
"checkver": {
7680
"url": "https://api.github.com/repos/microsoft/PowerToys/releases",
7781
"jsonpath": "$[0].assets[*].browser_download_url",

0 commit comments

Comments
 (0)