simple-dnscrypt: Fix extraction & persistence, refactor uninstaller logic#17073
simple-dnscrypt: Fix extraction & persistence, refactor uninstaller logic#17073SorYoshino wants to merge 1 commit intoScoopInstaller:masterfrom
Conversation
WalkthroughRevises the Simple DNSCrypt Scoop manifest: metadata updates, license object, renamed suggest key, removal of Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Scoop as Scoop (installer)
participant APPDIR as APPDIR (extracted files)
participant Persist as PersistDir
participant PowerShell as PowerShell
participant Service as dnscrypt-proxy Service
Scoop->>APPDIR: extract package
Scoop->>Persist: check for persisted logs/config
Persist-->>Scoop: provide persisted files
Scoop->>APPDIR: copy restored files into dnscrypt-proxy dir
Scoop->>PowerShell: run installer actions (register service etc.)
note over PowerShell,Service: Installed and started
%% Uninstall flow
Scoop->>PowerShell: run uninstaller script
PowerShell->>Service: query running service
alt service running
PowerShell->>Service: stop service
end
PowerShell->>Service: remove service registration
PowerShell->>Persist: copy *.log,*.txt from dnscrypt-proxy to PersistDir
Scoop->>Persist: complete cleanup
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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. 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. simple-dnscrypt
|
0b5c44d to
059b835
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@bucket/simple-dnscrypt.json`:
- Around line 27-30: The copy loop that iterates "'*.log', '*.txt' |
ForEach-Object {" currently copies files regardless of size and can reintroduce
empty files that break dnscrypt-proxy; update the block(s) that use Test-Path
and Copy-Item to first check the file size (e.g., via Get-Item or Get-ChildItem
and checking the Length property) and only run Copy-Item when Length -gt 0;
apply the same change to the second identical block (lines ~41-44) so empty
log/text files are skipped before copying to \"$dir\\dnscrypt-proxy\".
|
/verify |
|
All changes look good. Wait for review from human collaborators. simple-dnscrypt
|
Summary
Refactors
simple-dnscryptto fix extraction issues, improve persistence reliability, and align the uninstaller with Scoop's lifecycle.Related issues or pull requests
Changes
description,homepage, and structured thelicensefield.APPDIRsubfolder to the root directory during installation.persistfield to the main configuration.pre_uninstallto ensure they are preserved correctly in thepersist_dir.Stop-ProcessandStop-Serviceto theuninstallerblock to prevent silent data loss and respect Scoop's process check.Notes
pre_uninstalltouninstaller, Scoop can now properly notify users if the app is running before attempting to kill it.$service.BinaryPathName -notmatch $path_regexprevents the script from accidentally stopping or deleting non-Scoop versions ofdnscrypt-proxy.query.logare created indnscrypt-proxy, the application will fail to start properly.Uninstall.exebacks updnscrypt-proxy.tomlto$env:TEMPand stops thednscrypt-proxyservice. This behavior overlaps with the logic implemented in this PR, soStart-Process -Wait "$dir\Uninstall.exe" | Out-Nullhas been removed.Testing
The test results are as follows:
<manifest-name[@version]|chore>: <general summary of the pull request>Summary by CodeRabbit
Documentation
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.