bundle: split missing service manager handling#22076
Open
MikeMcQuaid wants to merge 1 commit intomainfrom
Open
bundle: split missing service manager handling#22076MikeMcQuaid wants to merge 1 commit intomainfrom
MikeMcQuaid wants to merge 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Homebrew::Bundle::Brew::Services.started_services to split the “no service manager available” handling so Linux can warn-and-continue when systemctl is missing (common in containers), while macOS continues to fail fast when launchctl is missing.
Changes:
- Refactor
started_servicesto delegate missing-daemon-manager behavior tostarted_services_without_daemon_manager. - Add a Linux-specific override that warns and returns
[]whensystemctlis missing. - Expand specs to cover shared fallback behavior plus macOS vs. Linux handling.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Library/Homebrew/bundle/brew_services.rb | Introduces started_services_without_daemon_manager and routes missing manager behavior through it; loads OS-specific extension. |
| Library/Homebrew/extend/os/bundle/brew_services.rb | Adds OS dispatch require for the Bundle BrewServices extension. |
| Library/Homebrew/extend/os/linux/bundle/brew_services.rb | Implements Linux override that warns and returns an empty list when no daemon manager is available. |
| Library/Homebrew/test/bundle/brew_services_spec.rb | Adds coverage for the fallback method and Linux/macOS-specific behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- warn and continue when Linux lacks `systemctl`, which is common in containers and other non-systemd environments - keep macOS failing fast because a missing `launchctl` indicates a broken setup rather than an expected configuration - cover the shared fallback plus macOS and Linux specific behaviour
53f11cc to
4a89b37
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
systemctl, which is common in containers and other non-systemd environmentslaunchctlindicates a broken setup rather than an expected configurationCloses #21828 (replaces and implements feedback and fixes merge conflicts)
brew lgtm(style, typechecking and tests) with your changes locally?Used OpenAI Codex with manual review and tweaks.