notepad4: Fix persistence#17289
Conversation
This PR fixes two issues: 1. Added `pre_install` hook to create empty `.ini` files. This prevents Scoop from mistakenly creating folders for `Notepad4.ini` and `matepath.ini` during fresh installations. 2. Added `Notepad4 DarkTheme.ini` to the `persist` array so users won't lose their dark theme settings after a scoop update.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughAdded a top-level Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. notepad4
|
|
/verify |
|
All changes look good. Wait for review from human collaborators. notepad4
|
|
/verify |
|
All changes look good. Wait for review from human collaborators. notepad4
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@bucket/notepad4.json`:
- Around line 33-35: The update migration only skips creating missing files by
checking Test-Path against "$persist_dir\\$_", but it doesn't handle cases where
that path exists as a directory (e.g., Notepad4.ini became a folder) so the bad
state remains; update the migration logic around Test-Path and Copy-Item to
detect when the existing path is a directory (use Get-Item and check
.PSIsContainer) and, if so, remove or rename that directory before copying the
default file from "$dir\\$_-default" to "$dir\\$_" (use Copy-Item with -Force
and appropriate error handling) so existing incorrect directory entries are
replaced by the correct persisted files.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This PR fixes two critical issues with the Notepad4 manifest:
pre_installhooks to copy the bundled.ini-defaultconfiguration files to their proper.ininames. This not only prevents Scoop from mistakenly creating folders forNotepad4.ini,matepath.ini, andNotepad4 DarkTheme.iniduring a fresh installation, but also ensures the application initializes correctly with the author's intended default settings.Notepad4 DarkTheme.inito thepersistarray so users won't lose their dark theme settings after runningscoop update.Closes ScoopInstaller/Scoop#6596
<manifest-name[@version]|chore>: <general summary of the pull request>Summary by CodeRabbit