Repository navigation
fix(scoop-info): Don't treat a folder with the app's name as its source - #6774
candygoogy wants to merge 4 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. Summary by CodeRabbit
Walkthrough
ChangesSource detection
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The change stops a same-named folder from overriding the source shown by scoop info, while URLs and manifest file paths behave as before. No merge-blocking risk was identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation For
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 |
|
Added |
8675fcf to
4b44d4a
Compare
`scoop info <app>` treated the argument as a local manifest whenever `Test-Path` found it, which is also true for a folder. Running it in a directory that contains a folder with the app's name showed that folder as the source. A local manifest is always a file, so check for a file.
0149774 to
d93ebd1
Compare
Description
scoop infonow only treats its argument as a local manifest (standalone source) when it is a file, by usingTest-Path -PathType Leaffor the standalone check. URLs and paths to manifest files work as before.Motivation and Context
scoop info <app>usesTest-Path $original_appto detect a local manifest.Test-Pathis also true for a folder, so a folder with the app's name in the current directory made the app "standalone" and its path was shown as the source, even though the manifest came from a bucket.Closes #6764
How Has This Been Tested?
On Windows 11 with
SCOOPandXDG_CONFIG_HOMEpointing to a test folder, a local bucketmainwithdemo.json, in Windows PowerShell 5.1 and PowerShell 7:scoop info demomainmainscoop info demo, with an emptydemofolder in the current directory...\demo(the folder)mainscoop info <path>\standalone-demo.jsonAdded
test/Scoop-Info.Tests.ps1with tests for the source of a bucket app, the same app with a same-named folder in the current directory, and a local manifest file. The folder test fails without the fix../test/bin/test.ps1gives the same results as ondevelopin both shells apart from the new tests: 164 passed, and the 19 failures are the Decompression tests, which need 7-Zip, lessmsi and innounp locally. The linter passes.Checklist:
developbranch.

Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
scoop infonow requires a local file before treating an argument as a standalone source.scoop infoshows the bucket when a same-named folder exists.Reviews (5) · Last reviewed commit: "test(scoop-info): Tag the Source tests a..." · Reviewed by Greptile