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)
| 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. |
| 110 | func 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 | |
| 123 | func extractEngineConfigWithInferredEngine(logsPath, inferredEngineID string) *AuditEngineConfig { |
| 124 | if logsPath == "" { |
no test coverage detected