MCPcopy Create free account
hub / github.com/compozy/agh / requireUnmanagedForMutation

Function requireUnmanagedForMutation

internal/cli/lifecycle.go:69–80  ·  view source on GitHub ↗
(deps commandDeps, action string)

Source from the content-addressed store, hash-verified

67}
68
69func requireUnmanagedForMutation(deps commandDeps, action string) error {
70 state := detectManagedState(deps)
71 if !state.Managed {
72 return nil
73 }
74 return fmt.Errorf(
75 "cli: AGH is managed by %s; refusing to %s through this binary. %s",
76 state.Manager,
77 strings.TrimSpace(action),
78 managedRecommendation(state.Manager, action),
79 )
80}
81
82func managedRecommendation(manager string, action string) string {
83 normalizedManager := strings.ToLower(strings.TrimSpace(manager))

Callers 2

runConfigSetCommandFunction · 0.85
newConfigEditCommandFunction · 0.85

Calls 2

detectManagedStateFunction · 0.85
managedRecommendationFunction · 0.85

Tested by

no test coverage detected