Suppressed the 'git init' branch advice leaking into the installer output. - #3074
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: 9 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. WalkthroughThe video update utility now handles uncaught throwables at the top level. The installer now suppresses Git default-branch advice during repository initialization. ChangesTooling robustness
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The changes clean up installer output and provide clearer failure handling for video generation without introducing an actionable merge-blocking risk; the PR is merge-ready after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Title checkExplanation The title clearly and concisely describes the primary change: suppressing Git branch advice from installer output. The additional PHP error-handling change is secondary and does not need to appear in the title.
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
Code coverage (threshold: 90%) Per-class coverage |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
|
Code coverage (threshold: 90%) Per-class coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3074 +/- ##
==========================================
- Coverage 87.36% 87.00% -0.36%
==========================================
Files 107 100 -7
Lines 5088 4925 -163
Branches 49 3 -46
==========================================
- Hits 4445 4285 -160
+ Misses 643 640 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
📖 Documentation preview for this pull request has been deployed to Netlify: https://6a960bb2425d948d5bb3fb97--vortex-docs.netlify.app This preview is rebuilt on every commit and is not the production documentation site. |
Summary
A
vortex-release-docsCI run failed while generating the installer demo video:FileManager::prepareDestination()initialises the new project's git repository withgit --work-tree=... --git-dir=... init > /dev/null, and when the host has noinit.defaultBranchconfigured, git writes its 13-line "Using 'master' as the name for the initial branch" advice to stderr, which the> /dev/nullredirect never touches andpassthru()draws straight into the installer's TUI transcript.VideoRecorder::assertNoIssues()refuses to render a demo whose transcript contains a warning, so the advice text aborted the recording. Thegit initinvocation now adds-c advice.defaultBranchName=false, which silences only that advice line, leaves real stderr output and the host's own branch-naming configuration untouched.update-videos.phpalso no longer lets a thrown exception surface as a raw PHP fatal error: the top-levelexit(main($argv))call is now wrapped in atry/catchthat prints the exception message to stderr and exits 1.Changes
.vortex/installer/src/Utils/FileManager.php- Added-c advice.defaultBranchName=falseto thegit initcommand built inprepareDestination(), so git's initial-branch-name advice never reaches the installer output, regardless of the host'sinit.defaultBranchsetting..vortex/docs/.utils/update-videos.php- Wrapped the script's top-levelexit(main($argv))in atry/catch, so a thrownRuntimeException(for example a missing-dependency guard failure) prints its message on its own line and exits with status 1, instead of producing an uncaught-exception fatal error, a stack trace, and exit code 255.The advice only ever reached the
vortex-release-docsjob:vortex-test-installer.ymlconfiguresinit.defaultBranchfor its own tests, which archive amainref from local fixture repos, so its copy of the video-generation step never saw the warning; that configuration is a genuine requirement of the installer's own test suite and is left in place.Verified locally:
composer test -- --filter FileManagerTestin.vortex/installerpasses (23 tests, 50 assertions); the patchedgit initcommand was run under an isolated git config and emits nothing on stderr;php -lis clean onupdate-videos.php.Before / After
Summary by CodeRabbit