mirror of
https://github.com/gogrlx/snack.git
synced 2026-04-02 05:08:42 -07:00
fix(detect): wire up ports package for OpenBSD detection
The ports package was fully implemented but detect_openbsd.go still returned nil candidates with a stale TODO. Wire up ports.New() so OpenBSD systems can auto-detect their package manager. Also adds: - Unit tests for GetCapabilities with mock managers (base + full) - Unit tests for Locker mutual exclusion - Edge case tests for ports parser (empty input, whitespace, fallback) - Minor dep updates (charmbracelet/ultraviolet, charmbracelet/x)
This commit is contained in:
@@ -2,12 +2,18 @@
|
||||
|
||||
package detect
|
||||
|
||||
import (
|
||||
"github.com/gogrlx/snack"
|
||||
"github.com/gogrlx/snack/ports"
|
||||
)
|
||||
|
||||
// candidates returns manager factories in probe order for OpenBSD.
|
||||
// TODO: wire up ports.New() once the ports package is implemented.
|
||||
func candidates() []managerFactory {
|
||||
return nil
|
||||
return []managerFactory{
|
||||
func() snack.Manager { return ports.New() },
|
||||
}
|
||||
}
|
||||
|
||||
func allManagers() []managerFactory {
|
||||
return nil
|
||||
return candidates()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user