Phase 5-7: README, Makefile, unit tests

- README.md: full usage docs
- Makefile: build/install/uninstall/test/lint/clean targets
- config/config_test.go: 7 tests (load, save, find, add, roundtrip, invalid yaml)
- runtime/runtime_test.go: 6 tests (get, available, ListRunning graceful degradation)
- systemd/generator_test.go: 7 tests (ServiceName, Generate system/user/custom/docker/unknown, buildExecCommands)
- fix: docker/podman ListRunning returns nil (not error) when daemon unavailable
- fix: invalid YAML test uses tab-indent which is genuinely unparseable
This commit is contained in:
2026-04-03 14:50:36 +02:00
parent 203e8e3f04
commit 5078558d01
7 changed files with 576 additions and 2 deletions

View File

@@ -26,7 +26,8 @@ func (p *Podman) ListRunning() ([]Container, error) {
out, err := exec.Command(bin, "ps", "--format", "json").Output()
if err != nil {
return nil, fmt.Errorf("podman ps: %w", err)
// Podman installed but not usable — treat as no containers
return nil, nil
}
var raw []podmanContainer