MCPcopy Create free account
hub / github.com/github/gh-aw / findAwInfoPath

Function findAwInfoPath

pkg/cli/audit_expanded.go:110–121  ·  view source on GitHub ↗

findAwInfoPath returns the first existing aw_info.json path from known locations. The activation artifact may or may not have been flattened to the root directory.

(logsPath string)

Source from the content-addressed store, hash-verified

108// findAwInfoPath returns the first existing aw_info.json path from known locations.
109// The activation artifact may or may not have been flattened to the root directory.
110func findAwInfoPath(logsPath string) string {
111 candidates := []string{
112 filepath.Join(logsPath, "aw_info.json"),
113 filepath.Join(logsPath, "activation", "aw_info.json"),
114 }
115 for _, p := range candidates {
116 if fileutil.FileExists(p) {
117 return p
118 }
119 }
120 return ""
121}
122
123func extractEngineConfigWithInferredEngine(logsPath, inferredEngineID string) *AuditEngineConfig {
124 if logsPath == "" {

Callers 3

buildAuditDataFunction · 0.85

Calls 1

FileExistsFunction · 0.92

Tested by

no test coverage detected