cudatext: Improve persistence and add uninstaller logic#17092
cudatext: Improve persistence and add uninstaller logic#17092SorYoshino wants to merge 1 commit intoScoopInstaller:masterfrom
Conversation
WalkthroughThe CudaText package manifest is updated to resolve plugin loss during updates by expanding the persist field to include the "py" folder, restructuring the license field, adding post-install and uninstall script blocks, and enhancing the description. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All changes look good. Wait for review from human collaborators. cudatext
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@bucket/cudatext.json`:
- Around line 20-27: In the post_install PowerShell block that iterates "'py',
'data' | ForEach-Object { … }", guard the Copy-Item call against empty
"$dir\$_.original" directories by checking for child items before copying: use
Test-Path/$null check or Get-ChildItem on "$dir\$_.original" and only invoke
Copy-Item when children exist; keep the existing Remove-Item behavior for
cleanup. This prevents non-terminating Copy-Item errors when an upstream release
provides an empty .original folder while leaving the rest of the post_install
logic unchanged.
🧹 Nitpick comments (1)
bucket/cudatext.json (1)
42-48: Handle missing uninstaller batch file; verify registry scope.If no
un*.cmdexists,$batch_fileis$nullandStart-Processwill throw, leaving the handler in place. Also, please confirm whether CudaText ever registers the handler under HKCU; if so, the early HKLM-only check would skip cleanup for per-user installs.🛠️ Suggested guard for missing batch file
if (-not (is_admin)) { abort "`n[ERROR] $app requires admin rights to $cmd." } $batch_file = Get-ChildItem -Path $dir -Filter 'un*.cmd' -File | Select-Object -First 1 + if (-not $batch_file) { abort "`n[ERROR] Missing uninstaller script (un*.cmd) in $dir." } Start-Process -FilePath $batch_file.FullName -NoNewWindow -Wait }
Summary
Restructures the
cudatextmanifest to support full persistence of add-ons and data, handles core component updates via.originaldirectories, and automates shell extension removal.Related issues or pull requests
Changes
descriptionto provide a more comprehensive overview of the editor's features.licensefield with a full SPDX identifier and a direct URL to the license file.post_installlogic to move files from.originaldirectories to active directories (pyanddata), ensuring core updates are applied while respecting the persistence layer.persistfield to includepyanddatafolders, preserving Python-based add-ons and application data across updates.uninstallerscript to automate the removal of the Explorer context menu handler using the application's own uninstallation batch files.explorerrestart command in the uninstaller to ensure shell extensions are refreshed immediately after removal.Notes
Testing
The test results are as follows:
<manifest-name[@version]|chore>: <general summary of the pull request>Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.