Jim Myhrberg f969c05b20
fix(services/list): correctly handle services with an error code
The `brew services list` command was not correctly handling services
that had an error code status.

While the `#zero?` method returns a boolean, the `#nonzero?` method
confusingly returns self or nil. Hence a negated `#zero?` call to check
for a non-zero exit code fixes the error.

While here, `#pid?` method uses a negated `#zero?`, which is not
accurate, as a negative PID value would not be a valid PID. Hence I
changed it to use `#positive?` instead.

The tests for the `#error?` method were marked as needing systemd, but I
saw no obvious reason for that due to how they all use mocked values, so
I removed the systemd requirement.
2025-03-15 22:13:44 +00:00
..
2025-02-06 21:04:08 -08:00
2024-12-31 00:15:10 +00:00
2025-03-13 11:59:31 -07:00
2025-03-13 12:16:11 -07:00
2025-02-24 10:23:42 -08:00
2025-01-19 12:32:55 +01:00
2025-03-13 11:59:31 -07:00
2025-03-14 20:34:01 +00:00
2025-01-16 15:12:03 -08:00
2025-02-06 21:04:08 -08:00
2025-02-04 16:27:39 +00:00
2025-01-27 08:42:49 +00:00
2025-02-17 18:56:31 -08:00
2025-03-13 12:16:11 -07:00
2025-02-17 18:56:31 -08:00
2025-03-02 21:36:03 -08:00
2025-02-16 13:26:10 -08:00
2025-03-13 11:59:31 -07:00
2025-02-21 14:53:34 +01:00
2025-02-06 21:04:08 -08:00
2025-02-17 18:56:31 -08:00
2025-03-13 12:16:11 -07:00
2025-02-04 16:27:39 +00:00
2024-12-11 11:04:55 -08:00
2025-01-07 17:40:18 +00:00
2025-02-04 21:18:02 +01:00
2024-12-05 14:01:37 +00:00
2025-02-04 16:27:39 +00:00
2025-03-02 21:36:03 -08:00
2025-01-07 17:40:18 +00:00
2024-12-07 10:35:33 -08:00
2025-03-02 21:36:03 -08:00
2025-03-02 21:36:03 -08:00
2025-02-06 21:04:08 -08:00
2025-02-24 11:57:20 -08:00
2025-02-17 19:11:48 -08:00

Homebrew Ruby API

This is the API for Homebrew.

The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.

You may also find the Formula Cookbook and Ruby Style Guide helpful in creating formulae.

Good luck!