Skip to content

everything: Update checkver, fix persistence & uninstaller logic#17079

Open
SorYoshino wants to merge 5 commits intoScoopInstaller:masterfrom
SorYoshino:everything
Open

everything: Update checkver, fix persistence & uninstaller logic#17079
SorYoshino wants to merge 5 commits intoScoopInstaller:masterfrom
SorYoshino:everything

Conversation

@SorYoshino
Copy link
Copy Markdown
Contributor

@SorYoshino SorYoshino commented Jan 23, 2026

Summary

Refactors everything manifest to ensure reliable data persistence, enhance uninstaller safety with registry cleanup, and modernize version detection.

Related issues or pull requests

Changes

  • Metadata Refinement: Updated description and structured the license field.
  • Improve Installation Scripting:
    • Add a check for existing configuration before initializing a default one.
    • Implement manual Copy-Item in pre_install and pre_uninstall for *.ini, *.db, *.csv, etc.
    • Optimize post_install to dynamically process registry scripts with correct escaping and encoding (unicode).
  • Relocate & Enhance Uninstaller Logic:
    • Move process/service termination to the uninstaller block for lifecycle compliance.
    • Registry Cleanup: Add automatic import of uninstallation registry files (un*.reg) during the uninstall phase.
    • Robust Service Detection: Implement a dual-path logic for service detection (using Get-Service for PS 6+ and Get-CimInstance for PS 5.1) with path-based regex validation to ensure only the Scoop-managed service is modified.
  • Modernize Checkver: Switch the update source to Changes.txt for more accurate version tracking.

Notes

  • Some links related to user data are as follows:
  • At present, the only script used to extend everything is (un)install-context.reg. However, additional scripts could be added in the future, such as those for startup registration or protocol handling. I will submit a separate PR to add them when I have the time. Therefore, I have proactively updated the related logic to use Get-ChildItem to dynamically retrieve the names of .reg files.
  • In Windows, service names are unique. Therefore, I believe that once the relevant services matching the criteria are detected, it is sufficient to stop them and remove only the services created by the application, rather than deleting all related services indiscriminately.

Testing

The test results are as follows:
┏[ D:\Software\Scoop\Local\apps\scoop\current\bin][ develop ≡]
└─> .\checkver.ps1 -App everything -Dir 'D:\Temporary\Software\Microsoft\Windows Sandbox\Repositories\Scoop\Buckets\Extras\bucket' -f
everything: 1.4.1.1032 (scoop version is 1.4.1.1032)
Forcing autoupdate!
Autoupdating everything
DEBUG[1769185142] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:230:5
DEBUG[1769185142] $substitutions.$preReleaseVersion             1.4.1.1032
DEBUG[1769185142] $substitutions.$version                       1.4.1.1032
DEBUG[1769185142] $substitutions.$basenameNoExt                 Everything-1.4.1.1032.x64
DEBUG[1769185142] $substitutions.$match1                        1.4.1.1032
DEBUG[1769185142] $substitutions.$matchHead                     1.4.1
DEBUG[1769185142] $substitutions.$baseurl                       https://www.voidtools.com
DEBUG[1769185142] $substitutions.$url                           https://www.voidtools.com/Everything-1.4.1.1032.x64.zip
DEBUG[1769185142] $substitutions.$matchTail                     .1032
DEBUG[1769185142] $substitutions.$cleanVersion                  1411032
DEBUG[1769185142] $substitutions.$majorVersion                  1
DEBUG[1769185142] $substitutions.$dashVersion                   1-4-1-1032
DEBUG[1769185142] $substitutions.$dotVersion                    1.4.1.1032
DEBUG[1769185142] $substitutions.$buildVersion                  1032
DEBUG[1769185142] $substitutions.$underscoreVersion             1_4_1_1032
DEBUG[1769185142] $substitutions.$patchVersion                  1
DEBUG[1769185142] $substitutions.$urlNoExt                      https://www.voidtools.com/Everything-1.4.1.1032.x64
DEBUG[1769185142] $substitutions.$minorVersion                  4
DEBUG[1769185142] $substitutions.$basename                      Everything-1.4.1.1032.x64.zip
DEBUG[1769185142] $hashfile_url = https://www.voidtools.com/Everything-1.4.1.1032.sha256 -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:233:5
Searching hash for Everything-1.4.1.1032.x64.zip in https://www.voidtools.com/Everything-1.4.1.1032.sha256
DEBUG[1769185143] $filenameRegex = ([a-fA-F0-9]{32,128})[\x20\t]+.*Everything-1\.4\.1\.1032\.x64\.zip(?:\s|$)|Everything-1\.4\.1\.1032\.x64\.zip[\x20\t]+.*?([a-fA-F0-9]{32,128}) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:101:13
Found: 698df475ec44e638f66f1b6a32d28fea613cec78d3b6310e6abe53431eeb940c using Extract Mode
DEBUG[1769185143] $substitutions (hashtable) -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:230:5
DEBUG[1769185143] $substitutions.$preReleaseVersion             1.4.1.1032
DEBUG[1769185143] $substitutions.$version                       1.4.1.1032
DEBUG[1769185143] $substitutions.$basenameNoExt                 Everything-1.4.1.1032.ARM64
DEBUG[1769185143] $substitutions.$match1                        1.4.1.1032
DEBUG[1769185143] $substitutions.$matchHead                     1.4.1
DEBUG[1769185143] $substitutions.$baseurl                       https://www.voidtools.com
DEBUG[1769185143] $substitutions.$url                           https://www.voidtools.com/Everything-1.4.1.1032.ARM64.zip
DEBUG[1769185143] $substitutions.$matchTail                     .1032
DEBUG[1769185143] $substitutions.$cleanVersion                  1411032
DEBUG[1769185143] $substitutions.$majorVersion                  1
DEBUG[1769185143] $substitutions.$dashVersion                   1-4-1-1032
DEBUG[1769185143] $substitutions.$dotVersion                    1.4.1.1032
DEBUG[1769185143] $substitutions.$buildVersion                  1032
DEBUG[1769185143] $substitutions.$underscoreVersion             1_4_1_1032
DEBUG[1769185143] $substitutions.$patchVersion                  1
DEBUG[1769185143] $substitutions.$urlNoExt                      https://www.voidtools.com/Everything-1.4.1.1032.ARM64
DEBUG[1769185143] $substitutions.$minorVersion                  4
DEBUG[1769185143] $substitutions.$basename                      Everything-1.4.1.1032.ARM64.zip
DEBUG[1769185143] $hashfile_url = https://www.voidtools.com/Everything-1.4.1.1032.sha256 -> D:\Software\Scoop\Local\apps\scoop\current\lib\autoupdate.ps1:233:5
Searching hash for Everything-1.4.1.1032.ARM64.zip in https://www.voidtools.com/Everything-1.4.1.1032.sha256
Could not find hash in https://www.voidtools.com/Everything-1.4.1.1032.sha256
Downloading Everything-1.4.1.1032.ARM64.zip to compute hashes!
Loading Everything-1.4.1.1032.ARM64.zip from cache
Computed hash: 23dca1a64574bf30c9988bbaf5f1d201a0ec7ee9a15e12270ae92a52183cccc8
Writing updated everything manifest


# The currently installed `Everything` does not have the service installed,
# but the globally installed `Everything` does have the service installed.

┏[ ~]
└─> Test-Administrator
False

┏[ ~]
└─> scoop install Unofficial/everything
Installing 'everything' (1.4.1.1032) [64bit] from 'Unofficial' bucket
Loading Everything-1.4.1.1032.x64.zip from cache.
Checking hash of Everything-1.4.1.1032.x64.zip... OK.
Extracting Everything-1.4.1.1032.x64.zip... Done.
Running pre_install script... Done.
Linking D:\Software\Scoop\Local\apps\everything\current => D:\Software\Scoop\Local\apps\everything\1.4.1.1032
Creating shim for 'Everything'.
Making D:\Software\Scoop\Local\shims\everything.exe a GUI binary.
Creating shortcut for Everything (Everything.exe)
Persisting Logs
Persisting HTTP server
Running post_install script... Done.
'everything' (1.4.1.1032) was installed successfully!
Notes
-----
To add Everything to right-click context menu, run:
reg import "D:\Software\Scoop\Local\apps\everything\current\install-context.reg"
-----

┏[ ~]
└─> Get-Service -Name 'Everything' | ForEach-Object -MemberName BinaryPathName
"D:\Software\Scoop\Global\apps\Everything\current\everything.exe" -svc

┏[ ~]
└─> scoop update everything -f
everything: 1.4.1.1032 -> 1.4.1.1032
Updating one outdated app:
Updating 'everything' (1.4.1.1032 -> 1.4.1.1032)
Downloading new version
Loading Everything-1.4.1.1032.x64.zip from cache.
Checking hash of Everything-1.4.1.1032.x64.zip... OK.
Running pre_uninstall script... Done.
Uninstalling 'everything' (1.4.1.1032)
Running uninstaller script... Done.
Removing shim 'Everything.shim'.
Removing shim 'Everything.exe'.
Unlinking D:\Software\Scoop\Local\apps\everything\current
Installing 'everything' (1.4.1.1032) [64bit] from 'Unofficial' bucket
Loading Everything-1.4.1.1032.x64.zip from cache.
Extracting Everything-1.4.1.1032.x64.zip... Done.
Running pre_install script... Done.
Linking D:\Software\Scoop\Local\apps\everything\current => D:\Software\Scoop\Local\apps\everything\1.4.1.1032
Creating shim for 'Everything'.
Making D:\Software\Scoop\Local\shims\everything.exe a GUI binary.
Creating shortcut for Everything (Everything.exe)
Persisting Logs
Persisting HTTP server
Running post_install script... Done.
'everything' (1.4.1.1032) was installed successfully!
Notes
-----
To add Everything to right-click context menu, run:
reg import "D:\Software\Scoop\Local\apps\everything\current\install-context.reg"
-----

┏[ ~]
└─> scoop uninstall everything -p
Uninstalling 'everything' (1.4.1.1032).
Running pre_uninstall script... Done.
WARN  The following instances of "everything" are still running. Scoop is configured to ignore this condition.

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     17     3.45      24.48       0.09   15864   1 everything

Running uninstaller script... Done.
Removing shim 'Everything.shim'.
Removing shim 'Everything.exe'.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\Everything.lnk
Unlinking D:\Software\Scoop\Local\apps\everything\current
Removing older version (_1.4.1.1032.old).
Removing persisted data.
'everything' was uninstalled.


# The currently installed `Everything` has installed a service.

┏[ ~]
└─> Test-Administrator
False

┏[ ~]
└─> Get-Service -Name 'Everything' | ForEach-Object -MemberName BinaryPathName
"D:\Software\Scoop\Local\apps\everything\current\everything.exe" -svc

┏[ ~]
└─> scoop update everything -f
everything: 1.4.1.1032 -> 1.4.1.1032
Updating one outdated app:
Updating 'everything' (1.4.1.1032 -> 1.4.1.1032)
Downloading new version
Loading Everything-1.4.1.1032.x64.zip from cache.
Checking hash of Everything-1.4.1.1032.x64.zip... OK.
Running pre_uninstall script... Done.
Uninstalling 'everything' (1.4.1.1032)
Running uninstaller script...
[ERROR]  everything requires admin rights to update.

┏[ ~]
└─[ Error, check your command]> sudo scoop update everything -f
everything: 1.4.1.1032 -> 1.4.1.1032
Updating one outdated app:
Updating 'everything' (1.4.1.1032 -> 1.4.1.1032)
WARN  The following instances of "everything" are still running. Scoop is configured to ignore this condition.

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     11     1.93      11.59       0.03    9484   0 everything

Downloading new version
Loading Everything-1.4.1.1032.x64.zip from cache.
Checking hash of Everything-1.4.1.1032.x64.zip... OK.
Running pre_uninstall script... Done.
Uninstalling 'everything' (1.4.1.1032)
Running uninstaller script... Done.
Removing shim 'Everything.shim'.
Removing shim 'Everything.exe'.
Unlinking D:\Software\Scoop\Local\apps\everything\current
Installing 'everything' (1.4.1.1032) [64bit] from 'Unofficial' bucket
Loading Everything-1.4.1.1032.x64.zip from cache.
Extracting Everything-1.4.1.1032.x64.zip... Done.
Running pre_install script... Done.
Linking D:\Software\Scoop\Local\apps\everything\current => D:\Software\Scoop\Local\apps\everything\1.4.1.1032
Creating shim for 'Everything'.
Making D:\Software\Scoop\Local\shims\everything.exe a GUI binary.
Creating shortcut for Everything (Everything.exe)
Persisting Logs
Persisting HTTP server
Running post_install script... Done.
'everything' (1.4.1.1032) was installed successfully!
Notes
-----
To add Everything to right-click context menu, run:
reg import "D:\Software\Scoop\Local\apps\everything\current\install-context.reg"
-----

┏[ ~]
└─> sudo scoop uninstall everything -p
Uninstalling 'everything' (1.4.1.1032).
Running pre_uninstall script... Done.
WARN  The following instances of "everything" are still running. Scoop is configured to ignore this condition.

 NPM(K)    PM(M)      WS(M)     CPU(s)      Id  SI ProcessName
 ------    -----      -----     ------      --  -- -----------
     17     3.39      24.46       0.17   10004   1 everything
     11     2.00      11.50       0.02   10256   0 everything
     23   126.90     150.52      12.55   18764   1 everything

Running uninstaller script... Done.
Removing shim 'Everything.shim'.
Removing shim 'Everything.exe'.
Removing shortcut ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Scoop Apps\Everything.lnk
Unlinking D:\Software\Scoop\Local\apps\everything\current
Removing older version (_1.4.1.1032.old).
Removing persisted data.
'everything' was uninstalled.

┏[ ~]
└─> Get-Service -Name 'Everything' | ForEach-Object -MemberName BinaryPathName
Get-Service: Cannot find any service with service name 'Everything'.
  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Summary by CodeRabbit

  • New Features

    • License now includes an explicit URL.
    • Structured version-check (url + regex) added.
    • Declared persistence for Logs and HTTP server.
    • Added an explicit uninstaller script to handle cleanup and service/process stop.
  • Refactor

    • Install/uninstall flows rewritten for more robust persistence handling, registry templating/encoding, and safer path/registration handling.
  • Documentation

    • Notes updated with separate commands for registering/unregistering associations, startup, context menu, and URL handler.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 23, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Manifest for Everything was restructured: license changed to an object; persist, uninstaller, and structured checkver were added; pre/post install and pre_uninstall PowerShell logic rewritten for arch-aware file handling, templated UTF-8→UTF-16LE registry outputs, and persisted-file copy/restore behavior.

Changes

Cohort / File(s) Summary
Manifest metadata & public fields
bucket/everything.json
Converted "license" string to an object with identifier and url; added persist array and top-level uninstaller.script; replaced checkver string with structured { url, regex }; updated notes.
Installer pre/post/uninstall logic
bucket/everything.json
Rewrote pre_install/post_install/pre_uninstall into PowerShell blocks: arch-aware arm64 rename, conditional INI detection, per-pattern persisted-file copy (*.db,*.csv,*.ico,*.ini,*.txt), and moved uninstall flow into uninstaller.script with PS-version-aware service/process stopping.
Registry scripting & encoding
bucket/everything.json
Replaced ad-hoc .reg edits with templating: load .reg files as UTF-8, optionally swap HKCUHKLM when $global, inject {{everything_dir}}, and write outputs as UTF-16LE/unicode for registry import.
Checkver / autoupdate
bucket/everything.json
Changed checkver from plain string to object { url, regex } pointing at Changes.txt and updated regex for version capture.

Sequence Diagram(s)

sequenceDiagram
    participant User as User
    participant Manifest as Manifest Scripts
    participant FS as Filesystem
    participant Reg as Registry Scripts
    participant Updater as Checkver

    User->>Manifest: trigger install
    Manifest->>FS: extract files, rename arm64 binary, copy install files
    Manifest->>FS: if $persist_dir contains *.ini/*.db... copy persisted files into install dir
    Manifest->>Reg: read .reg templates, replace {{everything_dir}}, encode UTF-16LE, write outputs
    Manifest->>Updater: use checkver {url, regex} for version checks
    User->>Manifest: trigger uninstall
    Manifest->>FS: copy *.db/*.csv/*.ico/*.ini/*.txt to persist dir
    Manifest->>Reg: import un*.reg via reg.exe to unregister
    Manifest->>FS: stop Everything processes/services (PS-version-aware)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

review-needed

Suggested reviewers

  • z-Fng

Poem

🐰 I hopped through JSON, tidy and spry,
License boxed, and logs tucked nigh,
Scripts now speak in templated tune,
Install, persist, remove—nice and soon,
Hop — version checks hum under moon. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and specifically summarizes the main changes: checkver update, persistence improvements, and uninstaller logic fixes.
Description check ✅ Passed The PR description fully satisfies the template requirements, including summary, related issues, detailed changes, notes, testing results, and both required checkboxes marked as complete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@bucket/everything.json`:
- Around line 33-37: The persistence pattern list used in the ForEach-Object
loop is missing the wildcard for text files—'txt' should be '*.txt'—so update
the pattern array/string used with ForEach-Object (the block referencing
$persist_dir, Test-Path and Copy-Item) to include '*.txt' instead of 'txt' in
both occurrences (the loop that iterates over the patterns and the similar block
at lines ~60-64) so Test-Path and Copy-Item will correctly match and persist
.txt files; ensure you update the same pattern source used by the ForEach-Object
invocation that checks Test-Path -PathType Leaf and calls Copy-Item.
- Around line 99-101: The current "checkver" regex only captures the numeric
portion and drops pre-release letters (e.g., `a`/`b`), so update the "regex"
value in the checkver block to capture an optional single-letter pre-release
suffix (or broader letter sequence if needed) appended to the numeric version
(e.g., capture "1.5.0.1400a" not just "1.5.0.1400"); alternatively, if you only
want stable releases, change the logic in the checkver parsing to filter out any
captures that include a trailing letter and only accept pure numeric versions.
Make this change where the "checkver" object and its "regex" value are defined
so version detection preserves or filters pre-release suffixes as required.

Comment thread bucket/everything.json Outdated
Comment thread bucket/everything.json
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@bucket/everything.json`:
- Around line 91-95: The removal step currently hardcodes the service name
('Everything') instead of using the discovered $service, which breaks named
instances; change the Remove-Service and the sc.exe delete invocation to use
$service.Name (and guard that $service is non-null) so both branches call
Remove-Service -Name $service.Name (or Start-Process -FilePath 'sc.exe'
-ArgumentList @('delete', $service.Name) ...) rather than the literal
'Everything'.
♻️ Duplicate comments (1)
bucket/everything.json (1)

99-102: Regex doesn't capture pre-release suffixes (alpha/beta).

Per Changes.txt format, pre-release versions use suffixes like 1.5.0.1400a (alpha) or 1.4.1.867b (beta). The current regex ([\\d.]+) only captures the numeric portion, potentially causing version detection issues when pre-release builds are present in the changelog.

Comment thread bucket/everything.json
@SorYoshino
Copy link
Copy Markdown
Contributor Author

/verify

@github-actions
Copy link
Copy Markdown
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@SorYoshino SorYoshino marked this pull request as draft February 4, 2026 11:59
@SorYoshino SorYoshino marked this pull request as ready for review February 4, 2026 12:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2026

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@SorYoshino
Copy link
Copy Markdown
Contributor Author

/verify

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@bucket/everything.json`:
- Around line 87-95: The service lookup fails on PowerShell 6+ because
Get-Service does not expose BinaryPathName cross-platform; update the branch
that currently uses Get-Service to instead call Get-CimInstance -ClassName
Win32_Service (same as the else branch) and then create the computed property
for BinaryPathName from PathName (or change the subsequent match to use PathName
instead of BinaryPathName) so that $services, $service and the $path_regex match
work consistently across PS versions; ensure you still use $base_service_name
for the initial name filter and preserve -ErrorAction SilentlyContinue.

Comment thread bucket/everything.json
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2026

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

@SorYoshino
Copy link
Copy Markdown
Contributor Author

The test failure occurs because Everything-$version.sha256 does not contain the hash for Everything-$version.ARM64.zip.

Since the author may provide the ARM64 hash in Everything-$version.sha256 in the future, or may stop providing the ARM64 build altogether, I believe it is unnecessary to move the hash object into the 64bit and 32bit sections.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
bucket/everything.json (3)

109-113: ⚠️ Potential issue | 🟠 Major

Hardcoded service name may fail for named instances.

The code correctly identifies the Scoop-managed service via path-based filtering into $service, but then hardcodes 'Everything' when removing the service. If a user has a named instance, this will attempt to remove the wrong service or fail.

🩹 Proposed fix
             "    if ($PSVersionTable.PSVersion -ge [version]::new(6, 0)) {",
-            "        Remove-Service -Name 'Everything' -ErrorAction SilentlyContinue",
+            "        Remove-Service -Name $service.Name -ErrorAction SilentlyContinue",
             "    } else {",
-            "        Start-Process -FilePath 'sc.exe' -ArgumentList @('delete', 'Everything') -NoNewWindow -Wait",
+            "        Start-Process -FilePath 'sc.exe' -ArgumentList @('delete', $service.Name) -NoNewWindow -Wait",
             "    }",
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/everything.json` around lines 109 - 113, The removal step hardcodes
the service name 'Everything' instead of using the discovered $service, so
update the code paths that call Remove-Service and the sc.exe delete invocation
to use the discovered service's name (e.g., $service.Name) and guard with a null
check on $service; specifically replace Remove-Service -Name 'Everything' and
the Start-Process sc.exe argument @('delete', 'Everything') with calls that use
$service.Name (or appropriate property) and only run when $service is found.

93-100: ⚠️ Potential issue | 🟠 Major

Service lookup may fail on PowerShell 6+ due to missing BinaryPathName property.

The PS6+ branch uses Get-Service which doesn't reliably expose BinaryPathName on all platforms. The filter at line 100 expects this property in both branches, but it may be $null on PS6+ cross-platform, preventing service identification.

Consider unifying on Get-CimInstance Win32_Service for both branches and filtering on PathName instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/everything.json` around lines 93 - 100, The PS6+ branch uses
Get-Service which may not populate BinaryPathName, causing the downstream filter
that assigns $service (the pipeline using $_.BinaryPathName -match $path_regex)
to miss matches; change both branches to use Get-CimInstance -ClassName
Win32_Service (or otherwise ensure PathName is present) so $services contains
the PathName property, and update the filter to use $_.PathName -match
$path_regex (keep $base_service_name for the initial filter if desired) so
service lookup works consistently across PowerShell versions.

117-120: ⚠️ Potential issue | 🟡 Minor

Regex doesn't capture pre-release suffixes (alpha/beta versions).

Changes.txt includes versions like 1.5.0.1400a (alpha) or 1.4.1.867b (beta). The current regex Version\\s*([\\d.]+)(?=\\s) captures only the numeric portion, dropping the letter suffix. This may cause version mismatches if pre-release builds are present.

🔎 Suggested regex adjustment
-        "regex": "Version\\s*([\\d.]+)(?=\\s)"
+        "regex": "Version\\s*([\\d.]+[a-z]?)(?=\\s)"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bucket/everything.json` around lines 117 - 120, The checkver regex currently
captures only the numeric portion and drops pre-release suffixes; update the
"regex" value in the "checkver" entry so the capture group includes an optional
alphabetic suffix (e.g. "a" or "b") by changing Version\\s*([\\d.]+)(?=\\s) to a
pattern like Version\\s*([\\d.]+[a-zA-Z]?)(?=\\s) so entries such as 1.5.0.1400a
or 1.4.1.867b are fully captured.
🤖 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/everything.json`:
- Line 52: The $everything_dir assignment uses -replace with an incorrect regex
that matches two backslashes; update the -replace call on the $everything_dir
line so the pattern matches a single literal backslash (use a doubled-escape for
the regex) and the replacement produces two literal backslashes (use a
quadruple-escape in the replacement), keeping the change within the same
$everything_dir = ... -replace expression so Windows paths like C:\Users\... are
correctly transformed for registry files.

---

Duplicate comments:
In `@bucket/everything.json`:
- Around line 109-113: The removal step hardcodes the service name 'Everything'
instead of using the discovered $service, so update the code paths that call
Remove-Service and the sc.exe delete invocation to use the discovered service's
name (e.g., $service.Name) and guard with a null check on $service; specifically
replace Remove-Service -Name 'Everything' and the Start-Process sc.exe argument
@('delete', 'Everything') with calls that use $service.Name (or appropriate
property) and only run when $service is found.
- Around line 93-100: The PS6+ branch uses Get-Service which may not populate
BinaryPathName, causing the downstream filter that assigns $service (the
pipeline using $_.BinaryPathName -match $path_regex) to miss matches; change
both branches to use Get-CimInstance -ClassName Win32_Service (or otherwise
ensure PathName is present) so $services contains the PathName property, and
update the filter to use $_.PathName -match $path_regex (keep $base_service_name
for the initial filter if desired) so service lookup works consistently across
PowerShell versions.
- Around line 117-120: The checkver regex currently captures only the numeric
portion and drops pre-release suffixes; update the "regex" value in the
"checkver" entry so the capture group includes an optional alphabetic suffix
(e.g. "a" or "b") by changing Version\\s*([\\d.]+)(?=\\s) to a pattern like
Version\\s*([\\d.]+[a-zA-Z]?)(?=\\s) so entries such as 1.5.0.1400a or
1.4.1.867b are fully captured.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fc6bf8de-21ed-49a1-9b24-9718dda69a82

📥 Commits

Reviewing files that changed from the base of the PR and between 1c83e4b and 0f2db50.

📒 Files selected for processing (1)
  • bucket/everything.json

Comment thread bucket/everything.json
@SorYoshino
Copy link
Copy Markdown
Contributor Author

/verify

@github-actions
Copy link
Copy Markdown
Contributor

Your changes did not pass all checks.

Please address the issues in the manifest and comment starting with /verify to rerun the checks.

everything

  • Lint
  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

Check the full log for details.

Comment thread bucket/everything.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants