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-05 23:36:57 -08:00
2025-03-13 20:29:26 +01:00
2024-10-02 10:03:12 -07:00
2025-02-24 10:23:42 -08:00
2025-01-19 12:32:55 +01:00
2024-12-05 14:26:30 -05:00
2025-02-04 16:27:39 +00:00
2024-10-02 10:03:12 -07:00
2025-02-25 10:56:31 -05:00
2025-03-13 20:29:26 +01:00
2025-02-24 11:57:20 -08:00