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

Function removeRuntimeArtifacts

internal/cli/lifecycle.go:216–233  ·  view source on GitHub ↗
(homePaths aghconfig.HomePaths)

Source from the content-addressed store, hash-verified

214}
215
216func removeRuntimeArtifacts(homePaths aghconfig.HomePaths) ([]string, error) {
217 candidates := []string{
218 homePaths.DaemonSocket,
219 homePaths.DaemonLock,
220 homePaths.DaemonInfo,
221 }
222 removed := make([]string, 0, len(candidates))
223 for _, path := range candidates {
224 deleted, err := removeFileIfExists(path)
225 if err != nil {
226 return nil, err
227 }
228 if deleted {
229 removed = append(removed, path)
230 }
231 }
232 return removed, nil
233}
234
235func removeFileIfExists(path string) (bool, error) {
236 trimmed := strings.TrimSpace(path)

Callers 1

newUninstallCommandFunction · 0.85

Calls 2

removeFileIfExistsFunction · 0.85
appendFunction · 0.85

Tested by

no test coverage detected