fix(buckets|scoop-install): Handle cases when Git is unavailable#6591
fix(buckets|scoop-install): Handle cases when Git is unavailable#6591z-Fng wants to merge 1 commit intoScoopInstaller:developfrom
Conversation
WalkthroughThese changes add handling for scenarios where Git is unavailable. A Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
|
The "scoop install git" command works just fine. Because the main bucket is already included with scoop as a normal non-git folder, which in return contains the manifest to install git. Once the main bucket is updated after fit is installed, the main bucket also gets converted to git. I'm not saying that is necessarily the best solution. I would prefer it if git (and 7zip) was always installed and the main bucket was synced with git in the first place. But it's not broken by default when scoop is installed. If your git it broken, better to reinstall scoop. This proposed solution is pure AI slop which does nothing. The only change I'd advocate for is for either git (and 7zip) to be installed by default, or git (and 7zip) to be installed automatically once a command requiring git is run, rather than throwing an error and having to install it manually. |
I think you missed the point of what I'm actually fixing here, and it's very rude of you to call this 'AI slop' before you've even figured out what problem I'm solving.
Scoop supports using external Git and 7zip installations. The assumption that 'git (and 7zip) was always installed by scoop' simply doesn't hold true for all users. Real-world scenarios are more complex than that—some errors even occur during installation, and the issue I'm addressing causes the error messages to be confusing. Reinstalling might clear the state, but it doesn't fix the logic gap that causes this confusing error in the first place. |
|
My apologies, I completely misunderstood what you were trying to achieve, and for my tone. I thought that you were actually trying to remediate the fact that git is not installed by default and that coderabbit make a fix which didn't actually do that. Actually you were just making some edge case error messages more user friendly. Which is a noble goal, but why not be more ambitious to actually provide a remediation for the elephant in the room that scoop doesn't install git automatically when needed? Just seems like extra work for the user, and doesn't seem that hard to implement. maybe something like this? update the Test-GitAvailable in lib/core.ps1: bin/scoop.ps1 lines 23 & 34 replace:
with
|
Motivation and Context
Fix two issues that occur when Git is not installed:
new_issue_msgcrashes when trying to invoke Git commands, leading to confusing error messages and incorrect issue links.e.g. [Bug] difficulty downloading 7zip #6588
[Bug] Cannot install 7zip and git #4735
[Bug] Scoop fails to install 7zip with error 1601 - Windows 2025 Server #6562
Changes:
lib/buckets.ps1: CheckTest-GitAvailablebefore invoking Git innew_issue_msg.libexec/scoop-install.ps1: Skip Scoop update when Git is not available.Checklist:
developbranch.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.