Improve curl commands#506
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a shared download_binary() bash helper (curl with retries and effective-URL logging), replaces inline macOS/Windows curl+unzip steps with calls to that helper, then moves and (on macOS) chmods the extracted ffmpeg/ffprobe into $INSTALL_DIR. ChangesFFmpeg Download Resilience
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/actions/setup-ffmpeg/action.yml:
- Around line 31-33: Add archive integrity verification before extracting
downloaded FFmpeg zips: after each curl that writes ffmpeg.zip (the command
using "https://www.osxexperts.net/ffmpeg${FF_VERSION}arm.zip" and the other
similar curl invocations referenced), also download the corresponding SHA-256
checksum or signature from a trusted source, compute the local checksum (e.g.,
using shasum -a 256 or sha256sum) for the saved ffmpeg.zip, compare it to the
trusted checksum and fail the action if they differ, and only proceed to
unzip/extract when the verification succeeds; apply the same checksum
download+verify flow to the other curl blocks mentioned (lines 36-38 and 45-47)
so every downloaded archive is verified before extraction.
- Around line 31-33: The curl downloads for FFmpeg currently don't treat HTTP
4xx/5xx as errors, so add the --fail flag to the curl invocations that fetch
"https://www.osxexperts.net/ffmpeg${FF_VERSION}arm.zip" (and the other two
FFmpeg download curl commands referenced nearby) so HTTP errors trigger the
configured --retry/--retry-delay and fail fast before unzip; keep the existing
flags (-sS -L --retry 3 --retry-delay 5) and simply insert --fail into those
curl command arguments.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 2fed14c3-8d0b-4a3a-8dc4-6c1158244401
📒 Files selected for processing (1)
.github/actions/setup-ffmpeg/action.yml
4ed249e to
39e0655
Compare
Summary by CodeRabbit