Skip to content

Conversation

@abgox
Copy link

@abgox abgox commented Dec 25, 2025

Closes #6573

How Has This Been Tested?

  • Tested on my computer.
  • Before adding the check, scoop list takes 2-3 minutes.
  • After adding it, it only takes 10 seconds.

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

Summary by CodeRabbit

  • Bug Fixes
    • Prevented errors when the deprecated components directory is missing by checking for its presence before attempting to read it. Deprecation information is now only accessed when available, avoiding runtime errors and improving stability and reliability when deprecated components are absent. No public APIs or behavior changes beyond improved error handling.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 25, 2025

Walkthrough

Adds a guard in app_status to check that the $deprecated_dir exists before enumerating it, and adds a changelog entry documenting the fix for slow behavior when the directory is absent.

Changes

Cohort / File(s) Summary
Changelog
CHANGELOG.md
Added bug-fix entry describing the deprecated-directory existence check.
Core logic
lib/core.ps1
In app_status, wrap Get-ChildItem with Test-Path for $deprecated_dir so the directory is only enumerated when it exists, avoiding slow behavior when missing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 I hop the path and take a peek,
If deprecated's gone, I skip the creek.
No needless search, no laggy shove,
Quick list, light paws, and carrots of love. 🥕

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main functional change: adding a check for the deprecated directory's existence before accessing it.
Linked Issues check ✅ Passed The PR implements the exact solution proposed in issue #6573: checking if the deprecated directory exists before accessing it to resolve the performance issue.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue; the CHANGELOG entry and core.ps1 modification both address the deprecated directory check without introducing unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 500f991 and 7c252e2.

📒 Files selected for processing (1)
  • CHANGELOG.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-31T01:48:00.222Z
Learnt from: z-Fng
Repo: ScoopInstaller/Scoop PR: 6471
File: CHANGELOG.md:9-9
Timestamp: 2025-08-31T01:48:00.222Z
Learning: The Scoop project's CHANGELOG.md follows a convention of tracking PR numbers only, not issue numbers, according to the maintainer z-Fng.

Applied to files:

  • CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: WindowsPowerShell
🔇 Additional comments (1)
CHANGELOG.md (1)

32-32: LGTM! Entry is properly formatted and references the PR number as per project convention.

The changelog entry correctly documents the fix using PR #6574 (rather than issue #6573), which aligns with the Scoop project's convention of tracking PR numbers only. The entry is well-positioned in the Bug Fixes section and accurately describes the change. Based on learnings, the PR reference format is consistent with project standards.


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.

@abgox abgox force-pushed the push-sywlkwlxoypl branch from adeaae9 to 091c062 Compare December 25, 2025 13:41
@abgox abgox force-pushed the push-sywlkwlxoypl branch from 091c062 to 500f991 Compare December 25, 2025 13:50
@niheaven niheaven merged commit aa3f9aa into ScoopInstaller:develop Dec 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants