feat(proxy): report blocked packages on stop, exit 1 if any were blocked

pmg proxy stop now waits for the proxy process to exit, reads the final
blocked count written to the state file on shutdown, and exits non-zero
when one or more packages were blocked during the session.

This gives CI a clear failure signal from the proxy itself, separate
from the package manager's own exit code.
This commit is contained in:
Sahilb315
2026-06-23 17:07:07 +05:30
parent e19aa274f1
commit ea2c7e8242
5 changed files with 63 additions and 19 deletions
+4 -3
View File
@@ -11,9 +11,10 @@ import (
const stateFileName = "proxy-state.json"
type State struct {
PID int `json:"pid"`
Addr string `json:"addr"`
CACertPath string `json:"ca_cert_path"`
PID int `json:"pid"`
Addr string `json:"addr"`
CACertPath string `json:"ca_cert_path"`
BlockedCount int `json:"blocked_count"`
}
func StatePath(configDir string) string {