Skip to content

Commit 901ff6d

Browse files
committed
fix: address CodeRabbit review — add pre_uninstall and ErrorAction
- qt-creator-cdb-ext-git.json: add -ErrorAction SilentlyContinue to post_install Remove-Item to suppress spurious error on fresh install when no prior qtcreatorcdbext* items exist - qt-creator-cdb-ext-git.json: add pre_uninstall to remove junctions from qt-creator-git's lib before uninstall, preventing dangling junction references - qt-creator-wininterrupt-git.json: add pre_uninstall to remove hard links from qt-creator-git's bin before uninstall, preventing orphaned executables after package removal
1 parent 03598d2 commit 901ff6d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

bucket/qt-creator-cdb-ext-git.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010
"Do not install alongside 'extras/qt-creator-cdb-ext' — both target the same parent app directory."
1111
],
1212
"depends": "versions/qt-creator-git",
13+
"pre_uninstall": "Remove-Item \"$(appdir qt-creator-git $global)\current\lib\qtcreatorcdbext*\" -Force -Recurse -ErrorAction SilentlyContinue",
1314
"architecture": {
1415
"64bit": {
1516
"url": "https://github.com/qt-creator/qt-creator/releases/download/v19.0.1/qtcreatorcdbext-windows-x64-msvc-19.0.1.7z",
1617
"hash": "sha256:cc042c1e5569c1ee5637dab034d02a8309b13214d6b32bcfc8655459d97f528a"
1718
}
1819
},
1920
"post_install": [
20-
"Remove-Item \"$(appdir qt-creator-git $global)\\current\\lib\\qtcreatorcdbext*\" -Force -Recurse",
21-
"(Get-Item $dir\\lib\\qtcreatorcdbext*).Name | foreach { New-Item \"$(appdir qt-creator-git $global)\\current\\lib\\$_\" -ItemType Junction -Target \"$dir\\lib\\$_\" -Force | Out-Null }"
21+
"Remove-Item \"$(appdir qt-creator-git $global)\current\lib\qtcreatorcdbext*\" -Force -Recurse -ErrorAction SilentlyContinue",
22+
"(Get-Item $dir\lib\qtcreatorcdbext*).Name | foreach { New-Item \"$(appdir qt-creator-git $global)\current\lib\$_\" -ItemType Junction -Target \"$dir\lib\$_\" -Force | Out-Null }"
2223
],
2324
"checkver": {
2425
"github": "https://github.com/qt-creator/qt-creator"

bucket/qt-creator-wininterrupt-git.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
"Do not install alongside 'extras/qt-creator-wininterrupt' — both target the same parent app directory."
1111
],
1212
"depends": "versions/qt-creator-git",
13+
"pre_uninstall": "Get-Item \"$dir\bin\win*interrupt.exe\" -ErrorAction SilentlyContinue | foreach { Remove-Item \"$(appdir qt-creator-git $global)\current\bin\$($_.Name)\" -Force -ErrorAction SilentlyContinue }",
1314
"architecture": {
1415
"64bit": {
1516
"url": "https://github.com/qt-creator/qt-creator/releases/download/v19.0.1/wininterrupt-windows-x64-msvc-19.0.1.7z",
1617
"hash": "sha256:d4c843d7a3daa1c203ed77c5797fe90251e5b1e8cc2a5a8409840d55e34faba9"
1718
}
1819
},
19-
"post_install": "(Get-Item $dir\\bin\\win*interrupt.exe).Name | foreach { New-Item \"$(appdir qt-creator-git $global)\\current\\bin\\$_\" -ItemType HardLink -Target \"$dir\\bin\\$_\" -Force | Out-Null }",
20+
"post_install": "(Get-Item $dir\bin\win*interrupt.exe).Name | foreach { New-Item \"$(appdir qt-creator-git $global)\current\bin\$_\" -ItemType HardLink -Target \"$dir\bin\$_\" -Force | Out-Null }",
2021
"checkver": {
2122
"github": "https://github.com/qt-creator/qt-creator"
2223
},

0 commit comments

Comments
 (0)