Take the console title helper from NosCore.Shared - #125
Conversation
try { Console.Title = Title; } catch (PlatformNotSupportedException) { } was
guessing at a state the package can now answer: 6.0.2 ships ConsoleHelper,
which asks whether this process owns a console before touching the title.
The catch was also aimed at the wrong exception - the throw on a process
with no console attached is an IOException, so it never caught anything
here.
Tested: builds with 0 warnings.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughNosCore.Injector updates ChangesConsole title update
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change uses the shared console-title helper to prevent detached-process startup failures while preserving normal console behavior. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
What
Program.cscarriedtry { Console.Title = Title; } catch (PlatformNotSupportedException) { }— guessing at a state the package can now answer. NosCore.Shared 6.0.2 shipsConsoleHelper, which asks whether this process owns a console before touching the title, so the line becomesConsoleHelper.SetTitle(Title).Worth knowing
That catch was aimed at the wrong exception. On a process with no console attached,
Console.TitlethrowsIOException, notPlatformNotSupportedException— measured:So it never caught anything here, and the injector would have died on the title line in a detached process just the same. The helper does not throw in the first place.
NosCore,NosCore.InjectorandNosCore.ParserInputGeneratorhad each grown their own version of this; all three now take the package's.Testing
Summary by CodeRabbit